mirror of https://github.com/status-im/NimYAML.git
Fixed indentation problems when dumping
* certain configurations of the Dumper added twice the requested indentation. * ref #140
This commit is contained in:
parent
854d33378e
commit
bf65a97cbe
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue