From b8afc8b9d9a3be4a074491f3d9587393d1d1a8ba Mon Sep 17 00:00:00 2001 From: Felix Krause Date: Thu, 24 Dec 2015 15:21:27 +0100 Subject: [PATCH] Fixed bug with indentation parsing --- src/private/sequential.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/private/sequential.nim b/src/private/sequential.nim index e125b5f..03d86a2 100644 --- a/src/private/sequential.nim +++ b/src/private/sequential.nim @@ -267,8 +267,10 @@ template handleBlockIndicator(expected, possible: openarray[DocumentLevelMode], template startPlainScalar() {.dirty.} = level.mode = mScalar + level.indentationColumn = lex.column scalarCache = lex.content scalarCacheType = lex.typeHint + scalarIndentation = lex.column state = ypBlockAfterScalar template handleTagHandle() {.dirty.} = @@ -536,7 +538,6 @@ proc parse*(parser: YamlSequentialParser, of tColon: assert level.mode in [mUnknown, mImplicitBlockMapKey, mScalar] if level.mode in [mUnknown, mScalar]: - level.indentationColumn = scalarIndentation # tags and anchors are for key scalar, not for map. yield YamlParserEvent(kind: yamlStartMap, objAnchor: anchorNone, @@ -955,7 +956,6 @@ proc parse*(parser: YamlSequentialParser, indentationColumn: -1) state = ypFlow else: - echo "level.mode = ", level.mode yieldUnexpectedToken() of tClosingBrace: if level.mode != mFlowMapValue: