diff --git a/src/options.ts b/src/options.ts index 667d3337..33cda9bd 100644 --- a/src/options.ts +++ b/src/options.ts @@ -303,7 +303,7 @@ export type ToStringOptions = { /** * When true, a single space of padding will be added inside the delimiters * of non-empty single-line flow collections. - * + * * Default: `true` */ flowCollectionPadding?: boolean diff --git a/src/stringify/stringifyCollection.ts b/src/stringify/stringifyCollection.ts index 57aad59b..326e3afb 100644 --- a/src/stringify/stringifyCollection.ts +++ b/src/stringify/stringifyCollection.ts @@ -94,7 +94,7 @@ function stringifyFlowCollection( const { indent, indentStep, - flowCollectionPadding, + flowCollectionPadding: fcPadding, options: { commentString } } = ctx itemIndent += indentStep @@ -156,7 +156,7 @@ function stringifyFlowCollection( str += line ? `\n${indentStep}${indent}${line}` : '\n' str += `\n${indent}${end}` } else { - str = `${start}${flowCollectionPadding}${lines.join(' ')}${flowCollectionPadding}${end}` + str = `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}` } }