No newlines in explicit flow maps for ypsMinimal

This commit is contained in:
Felix Krause 2016-01-11 20:58:24 +01:00
parent fc9607f959
commit 2d4746b56c
1 changed files with 5 additions and 3 deletions

View File

@ -62,6 +62,7 @@ proc startItem(target: Stream, style: YamlPresentationStyle, indentation: int,
target.write(": ")
state = dBlockMapValue
of dFlowExplicitMapKey:
if style != ypsMinimal:
target.write('\x0A')
target.write(repeat(' ', indentation))
target.write(": ")
@ -76,7 +77,8 @@ proc startItem(target: Stream, style: YamlPresentationStyle, indentation: int,
target.write(", ")
state = dFlowImplicitMapKey
of dFlowMapStart:
if isObject or style in [ypsJson, ypsCanonical]:
if (isObject and style != ypsMinimal) or
style in [ypsJson, ypsCanonical]:
target.write("\x0A" & repeat(' ', indentation))
if style != ypsJson:
target.write("? ")