mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2026-08-11 02:46:21 -06:00
node_modules: update (#146)
Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
+13
-3
@@ -104,12 +104,22 @@ function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
|
||||
if (comment)
|
||||
reqNewline = true;
|
||||
let str = stringify.stringify(item, itemCtx, () => (comment = null));
|
||||
if (i < items.length - 1)
|
||||
reqNewline || (reqNewline = lines.length > linesAtValue || str.includes('\n'));
|
||||
if (i < items.length - 1) {
|
||||
str += ',';
|
||||
}
|
||||
else if (ctx.options.trailingComma) {
|
||||
if (ctx.options.lineWidth > 0) {
|
||||
reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) +
|
||||
(str.length + 2) >
|
||||
ctx.options.lineWidth);
|
||||
}
|
||||
if (reqNewline) {
|
||||
str += ',';
|
||||
}
|
||||
}
|
||||
if (comment)
|
||||
str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
|
||||
if (!reqNewline && (lines.length > linesAtValue || str.includes('\n')))
|
||||
reqNewline = true;
|
||||
lines.push(str);
|
||||
linesAtValue = lines.length;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user