mirror of https://github.com/status-im/NimYAML.git
No newlines in explicit flow maps for ypsMinimal
This commit is contained in:
parent
fc9607f959
commit
2d4746b56c
|
@ -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("? ")
|
||||
|
|
Loading…
Reference in New Issue