mirror of https://github.com/status-im/NimYAML.git
REALLY fixed presenter bug
This commit is contained in:
parent
fe583e8538
commit
a1b92a14de
|
@ -76,6 +76,7 @@ proc startItem(target: Stream, style: YamlPresentationStyle, indentation: int,
|
||||||
state = dFlowExplicitMapKey
|
state = dFlowExplicitMapKey
|
||||||
elif isObject and style == ypsMinimal:
|
elif isObject and style == ypsMinimal:
|
||||||
target.write(", ? ")
|
target.write(", ? ")
|
||||||
|
state = dFlowExplicitMapKey
|
||||||
else:
|
else:
|
||||||
target.write(", ")
|
target.write(", ")
|
||||||
state = dFlowImplicitMapKey
|
state = dFlowImplicitMapKey
|
||||||
|
@ -428,11 +429,9 @@ proc present*(s: YamlStream, target: Stream, tagLib: YamlTagLibrary,
|
||||||
dBlockImplicitMapKey, dBlockSequenceItem]:
|
dBlockImplicitMapKey, dBlockSequenceItem]:
|
||||||
indentation -= indentationStep
|
indentation -= indentationStep
|
||||||
safeWrite('}')
|
safeWrite('}')
|
||||||
of dBlockMapValue, dBlockInlineMap, dBlockImplicitMapKey,
|
of dBlockMapValue, dBlockInlineMap:
|
||||||
dBlockExplicitMapKey:
|
|
||||||
discard
|
discard
|
||||||
else:
|
else:
|
||||||
echo "Unexpected level: ", level
|
|
||||||
assert false
|
assert false
|
||||||
indentation -= indentationStep
|
indentation -= indentationStep
|
||||||
of yamlEndDocument:
|
of yamlEndDocument:
|
||||||
|
|
Loading…
Reference in New Issue