Skip to content

Commit

Permalink
Bugfix: unquoted strings looked for an ending \n now $ will also do.
Browse files Browse the repository at this point in the history
fixes https://github.com/visionmedia/js-yaml/issues#issue/13

Signed-off-by: Tj Holowaychuk <tj@vision-media.ca>
  • Loading branch information
CrypticSwarm authored and tj committed Apr 15, 2011
1 parent a8609a4 commit 4255008
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var tokens = [
[']', /^\]/],
['-', /^\-/],
[':', /^[:]/],
['string', /^(?![^:\n\s]*:[^\/]{2})(([^:,\]\}\n\s]|(?!\n)\s(?!\s*?\n)|:\/\/|,(?=[^\n]*\s*[^\]\}\s\n]\s*\n)|[\]\}](?=[^\n]*\s*[^\]\}\s\n]\s*\n))*)(?=[,:\]\}\s\n]+)/],
['string', /^(?![^:\n\s]*:[^\/]{2})(([^:,\]\}\n\s]|(?!\n)\s(?!\s*?\n)|:\/\/|,(?=[^\n]*\s*[^\]\}\s\n]\s*\n)|[\]\}](?=[^\n]*\s*[^\]\}\s\n]\s*\n))*)(?=[,:\]\}\s\n]|$)/],
['id', /^([\w ]+)/],
]

Expand Down

0 comments on commit 4255008

Please sign in to comment.