REALLY fixed presenter bug

This commit is contained in:
Felix Krause 2016-01-11 21:12:38 +01:00
parent fe583e8538
commit a1b92a14de
1 changed files with 2 additions and 3 deletions

View File

@ -76,6 +76,7 @@ proc startItem(target: Stream, style: YamlPresentationStyle, indentation: int,
state = dFlowExplicitMapKey
elif isObject and style == ypsMinimal:
target.write(", ? ")
state = dFlowExplicitMapKey
else:
target.write(", ")
state = dFlowImplicitMapKey
@ -428,11 +429,9 @@ proc present*(s: YamlStream, target: Stream, tagLib: YamlTagLibrary,
dBlockImplicitMapKey, dBlockSequenceItem]:
indentation -= indentationStep
safeWrite('}')
of dBlockMapValue, dBlockInlineMap, dBlockImplicitMapKey,
dBlockExplicitMapKey:
of dBlockMapValue, dBlockInlineMap:
discard
else:
echo "Unexpected level: ", level
assert false
indentation -= indentationStep
of yamlEndDocument: