indentation indicator at document root
flyx <[email protected]> Fri, 25 Mar 2016 11:20:42 +0100
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <[email protected]> |
Hi folks, the spec defines the indentation level of a document’s root node parent as -1 (9.3.1). So when the document contains a block scalar as root node with explicit indentation indicator, this leads to unexpected results: %YAML 1.2 --- |1 foo The above is valid according to spec, which says about the indentation indicator „This level is specified as the integer number of the additional indentation spaces used for the content, relative to its parent node“. Since -1 (parent node indentation) + 1 (given integer number) is 0, and that’s the indentation of the scalar "foo", this is valid YAML. The reference parser handles this correctly, while PyYaml does not. Is this intended? Cheers, Felix ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 _______________________________________________ Yaml-core mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/yaml-core