From 7cbc8cedeada005e97f76fea2c07dbf87095c8bb Mon Sep 17 00:00:00 2001 From: totoro Date: Wed, 22 Jun 2016 06:35:45 +0200 Subject: [PATCH] add indentation blank count (must update anubis lib) --- file_processor_io/yaml/yaml_parser.anubis | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/file_processor_io/yaml/yaml_parser.anubis b/file_processor_io/yaml/yaml_parser.anubis index 460db7c..b06670b 100644 --- a/file_processor_io/yaml/yaml_parser.anubis +++ b/file_processor_io/yaml/yaml_parser.anubis @@ -33,7 +33,8 @@ public define Maybe(YAML_Document) get_yaml_document_content(s, doc) //check for item of the list else if start_with(line, "- ") then - println("list item ["+line+"]"); + with indent = count_blank(_line), + println("list item indent["+indent+"]["+line+"]"); get_yaml_document_content(s, doc) //check for entry of the map else @@ -43,7 +44,8 @@ public define Maybe(YAML_Document) println("unrecognize line ["+line+"]"); get_yaml_document_content(s, doc), success(pos) then - println("map entry ["+line+"]"); + with indent = count_blank(_line), + println("map entry indent["+indent+"]["+line+"]"); get_yaml_document_content(s, doc) } }. -- libgit2 0.21.4