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,8 +62,9 @@ proc startItem(target: Stream, style: YamlPresentationStyle, indentation: int,
|
||||||
target.write(": ")
|
target.write(": ")
|
||||||
state = dBlockMapValue
|
state = dBlockMapValue
|
||||||
of dFlowExplicitMapKey:
|
of dFlowExplicitMapKey:
|
||||||
target.write('\x0A')
|
if style != ypsMinimal:
|
||||||
target.write(repeat(' ', indentation))
|
target.write('\x0A')
|
||||||
|
target.write(repeat(' ', indentation))
|
||||||
target.write(": ")
|
target.write(": ")
|
||||||
state = dFlowMapValue
|
state = dFlowMapValue
|
||||||
of dFlowMapValue:
|
of dFlowMapValue:
|
||||||
|
@ -76,7 +77,8 @@ proc startItem(target: Stream, style: YamlPresentationStyle, indentation: int,
|
||||||
target.write(", ")
|
target.write(", ")
|
||||||
state = dFlowImplicitMapKey
|
state = dFlowImplicitMapKey
|
||||||
of dFlowMapStart:
|
of dFlowMapStart:
|
||||||
if isObject or style in [ypsJson, ypsCanonical]:
|
if (isObject and style != ypsMinimal) or
|
||||||
|
style in [ypsJson, ypsCanonical]:
|
||||||
target.write("\x0A" & repeat(' ', indentation))
|
target.write("\x0A" & repeat(' ', indentation))
|
||||||
if style != ypsJson:
|
if style != ypsJson:
|
||||||
target.write("? ")
|
target.write("? ")
|
||||||
|
|
Loading…
Reference in New Issue