Skip to content

Commit

Permalink
Improved unquoted strings.
Browse files Browse the repository at this point in the history
URLs can be used in unquoted strings
Accented characters can be used as initial letters in unquoted strings.

Signed-off-by: Tj Holowaychuk <tj@vision-media.ca>
  • Loading branch information
CrypticSwarm authored and tj committed Apr 15, 2011
1 parent e1cc4f8 commit 9b9597f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/yaml.js
Expand Up @@ -41,10 +41,8 @@ var tokens = [
['false', /^(disabled|false|no|off)/],
['string', /^"(.*?)"/],
['string', /^'(.*?)'/],
['string', /^([a-zA-Z][^:,\]\}]*?)(?=\s*[,\n\]\}])/],
['float', /^(\d+\.\d+)/],
['int', /^(\d+)/],
['id', /^([\w ]+)/],
['doc', /^---/],
[',', /^,/],
['{', /^\{/],
Expand All @@ -53,6 +51,8 @@ var tokens = [
[']', /^\]/],
['-', /^\-/],
[':', /^[:]/],
['string', /^(.([^:,\]\}]|:\/\/)*?)(?=\s*[,\n\]\}])/],
['id', /^([\w ]+)/],
]

/**
Expand Down

0 comments on commit 9b9597f

Please sign in to comment.