tj/js-yaml

Strings starting with number aren't parsed properly

enyo opened this issue · 1 comments

enyo commented

When a string starts with a number, it results in a parse error:

1) config should parse the default config file:
     Error: Cannot parse config file: 'config/default.yaml': Error: hash not properly dedented, near "AES-128-CFB8\n  ivLength: "
enyo commented

To fix the problem the int regexp should be:

['int', /^(\d+)(?=\s*[,\n\s\}\]])/],