Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added windows newline support

  • Loading branch information...
commit 127c29f61a111a0a574ce5fb0f1d8e2cbb411607 1 parent 8702385
@jan-swiecki jan-swiecki authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/yaml.js
View
4 lib/yaml.js
@@ -68,6 +68,10 @@ exports.tokenize = function (str) {
var token, captures, ignore, input,
indents = 0, lastIndents = 0,
stack = [], indentAmount = -1
+
+ // Windows new line support (CR+LF, \r\n)
+ str = str.replace(/\r\n/g, "\n");
+
while (str.length) {
for (var i = 0, len = tokens.length; i < len; ++i)
if (captures = tokens[i][1].exec(str)) {
Please sign in to comment.
Something went wrong with that request. Please try again.