From bf65a97cbef84861def59f08c0abd2e4864021ec Mon Sep 17 00:00:00 2001 From: Felix Krause Date: Tue, 7 Nov 2023 21:55:13 +0100 Subject: [PATCH] Fixed indentation problems when dumping * certain configurations of the Dumper added twice the requested indentation. * ref #140 --- yaml/presenter.nim | 2 -- 1 file changed, 2 deletions(-) diff --git a/yaml/presenter.nim b/yaml/presenter.nim index 41b7b96..2a43240 100644 --- a/yaml/presenter.nim +++ b/yaml/presenter.nim @@ -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: