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

Multi-line string throwing "Malformed YAML string" error #141

Open
brendon-stephens opened this issue Oct 8, 2021 · 0 comments
Open

Multi-line string throwing "Malformed YAML string" error #141

brendon-stephens opened this issue Oct 8, 2021 · 0 comments

Comments

@brendon-stephens
Copy link

brendon-stephens commented Oct 8, 2021

Given the following valid YAML file

test.yaml

test: "ThisIsAVery\
  LargeString\
  WhichNeedsToBe\
  SeperatedOver\
  MultipleLines\
  WithoutSpaces"

and the following javascript

test.js

const YAML = require('yamljs')

const yaml = YAML.load('test.yaml')
console.log(yaml)

Throws the following error

$ node test.js

C:\Apps\Projects\Sandbox\node_modules\yamljs\lib\Parser.js:404
            throw e;
            ^
[ParseMore [Error]: Malformed inline YAML string ("ThisIsAVery\
LargeString\
WhichNeedsToBe\
SeperatedOver\
MultipleLines\
WithoutSpaces").] {
  parsedLine: ←[33m6←[39m,
  snippet: ←[32m'    WithoutSpaces"'←[39m
}
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

1 participant