tj / js-yaml

CommonJS YAML Parser -- fast, elegant and tiny yaml parser for javascript
276 stars 41 forks source link

Single-escaped strings with '' should be valid #60

Open irony opened 8 years ago

irony commented 8 years ago

When trying to parse this valid string

key: value: 'Let''s encode this'

It throws this error:

Error: hash not properly dedented, near "'s escape this'" at Parser.expect (/Users/cln/src/js-yaml/lib/yaml.js:183:9) at Parser.parseHash (/Users/cln/src/js-yaml/lib/yaml.js:287:12) at Parser.parse (/Users/cln/src/js-yaml/lib/yaml.js:244:19) at Object.exports.eval (/Users/cln/src/js-yaml/lib/yaml.js:388:46) at /Users/cln/src/js-yaml/examples/run.js:14:20 at FSReqWrap.readFileAfterClose as oncomplete

http://symfony.com/doc/current/components/yaml/yaml_format.html