js-yaml
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -5,3 +5,3 @@ | ||
"main": "js-yaml.js", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"homepage": "https://github.com/nodeca/js-yaml", | ||
@@ -8,0 +8,0 @@ "authors": [ "Dervus Grim <dervus.grim@gmail.com>", |
@@ -0,1 +1,9 @@ | ||
3.0.1 / 2013-12-22 | ||
------------------ | ||
- Fixed parsing of literal scalars. (issue #108) | ||
- Prevented adding unnecessary spaces in object dumps. (issue #68) | ||
- Fixed dumping of objects with very long (> 1024 in length) keys. | ||
3.0.0 / 2013-12-16 | ||
@@ -2,0 +10,0 @@ ------------------ |
@@ -336,6 +336,11 @@ 'use strict'; | ||
explicitPair = (null !== state.tag && '?' !== state.tag && state.dump.length <= 1024); | ||
explicitPair = (null !== state.tag && '?' !== state.tag) || | ||
(state.dump && state.dump.length > 1024); | ||
if (explicitPair) { | ||
pairBuffer += '? '; | ||
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { | ||
pairBuffer += '?'; | ||
} else { | ||
pairBuffer += '? '; | ||
} | ||
} | ||
@@ -353,4 +358,10 @@ | ||
pairBuffer += ': ' + state.dump; | ||
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { | ||
pairBuffer += ':'; | ||
} else { | ||
pairBuffer += ': '; | ||
} | ||
pairBuffer += state.dump; | ||
// Both key and value are valid. | ||
@@ -357,0 +368,0 @@ _result += pairBuffer; |
@@ -872,3 +872,11 @@ 'use strict'; | ||
} else { | ||
state.result += common.repeat('\n', emptyLines + 1); | ||
// If current line isn't the first one - count line break from the last content line. | ||
if (detectedIndent) { | ||
state.result += common.repeat('\n', emptyLines + 1); | ||
// In case of the first content line - count only empty lines. | ||
} else { | ||
state.result += common.repeat('\n', emptyLines); | ||
} | ||
} | ||
@@ -875,0 +883,0 @@ |
{ | ||
"name" : "js-yaml", | ||
"version" : "3.0.0", | ||
"version" : "3.0.1", | ||
"description" : "YAML 1.2 parser and serializer", | ||
@@ -5,0 +5,0 @@ "keywords" : ["yaml", "parser", "serializer", "pyyaml"], |
120855
2869