Fixed indentation problems when dumping

* certain configurations of the Dumper added twice the requested
   indentation.
 * ref #140
This commit is contained in:
Felix Krause 2023-11-07 21:55:13 +01:00
parent 854d33378e
commit bf65a97cbe
1 changed files with 0 additions and 2 deletions

View File

@ -671,7 +671,6 @@ proc doPresent(
if ctx.levels.len > 0 and not ctx.options.condenseFlow and
ctx.state in [dBlockExplicitMapKey, dBlockMapValue,
dBlockImplicitMapKey, dBlockSequenceItem]:
indentation += ctx.options.indentationStep
if ctx.options.newlines != nlNone: singleLine = false
ctx.levels.add (nextState, indentation, singleLine, wroteAnything)
of yamlStartMap:
@ -722,7 +721,6 @@ proc doPresent(
if ctx.levels.len > 0 and not ctx.options.condenseFlow and
ctx.state in [dBlockExplicitMapKey, dBlockMapValue,
dBlockImplicitMapKey, dBlockSequenceItem]:
indentation += ctx.options.indentationStep
if ctx.options.newlines != nlNone: singleLine = false
ctx.levels.add (nextState, indentation, singleLine, wroteAnything)
of yamlEndSeq: