Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAMLSemanticError when parsing YAML with curly braces #114

Closed
leedm777 opened this issue May 22, 2019 · 1 comment
Closed

YAMLSemanticError when parsing YAML with curly braces #114

leedm777 opened this issue May 22, 2019 · 1 comment

Comments

@leedm777
Copy link

YAML such as the following generates an error YAMLSemanticError: Insufficient indentation in flow collection

foo: {
  bar: boom
}
> const yaml = require('yaml')
undefined
> yaml.parse('foo: {\n  bar: boom\n}\n', { prettyErrors: true })
{ YAMLSemanticError: Insufficient indentation in flow collection
    at FlowCollection.parse (/Users/dlee/prj/sangoma/zulu/zulu-cloud/node_modules/yaml/dist/cst/FlowCollection.js:77:60)
    at ParseContext._defineProperty (/Users/dlee/prj/sangoma/zulu/zulu-cloud/node_modules/yaml/dist/cst/ParseContext.js:141:25)
    at CollectionItem.parse (/Users/dlee/prj/sangoma/zulu/zulu-cloud/node_modules/yaml/dist/cst/CollectionItem.js:81:19)
    at ParseContext._defineProperty (/Users/dlee/prj/sangoma/zulu/zulu-cloud/node_modules/yaml/dist/cst/ParseContext.js:141:25)
    at Collection.parse (/Users/dlee/prj/sangoma/zulu/zulu-cloud/node_modules/yaml/dist/cst/Collection.js:199:20)
    at ParseContext._defineProperty (/Users/dlee/prj/sangoma/zulu/zulu-cloud/node_modules/yaml/dist/cst/ParseContext.js:157:29)
    at Document.parseContents (/Users/dlee/prj/sangoma/zulu/zulu-cloud/node_modules/yaml/dist/cst/Document.js:176:26)
    at Document.parse (/Users/dlee/prj/sangoma/zulu/zulu-cloud/node_modules/yaml/dist/cst/Document.js:238:19)
    at parse (/Users/dlee/prj/sangoma/zulu/zulu-cloud/node_modules/yaml/dist/cst/parse.js:33:18)
    at parseDocument (/Users/dlee/prj/sangoma/zulu/zulu-cloud/node_modules/yaml/dist/index.js:65:34)
  name: 'YAMLSemanticError',
  message: 'Insufficient indentation in flow collection',
  nodeType: 'FLOW_MAP',
  range: Range { start: 5, end: 20 },
  linePos: { start: { line: 1, col: 6 }, end: { line: 3, col: 2 } } }
@eemeli
Copy link
Owner

eemeli commented May 23, 2019

Duplicate of #113, see there for conclusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants