summaryrefslogtreecommitdiff
path: root/bin/yaml.js
diff options
context:
space:
mode:
Diffstat (limited to 'bin/yaml.js')
-rw-r--r--bin/yaml.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/yaml.js b/bin/yaml.js
index 53a88de..c3f6d9c 100644
--- a/bin/yaml.js
+++ b/bin/yaml.js
@@ -1291,12 +1291,17 @@ YamlParser.prototype =
var data = [this.currentLine.substr(newIndent)];
- var isItUnindentedCollection = this.isStringUnIndentedCollectionItem(this.currentLine);
+ var isUnindentedCollection = this.isStringUnIndentedCollectionItem(this.currentLine);
+
+ var continuationIndent = -1;
+ if (isUnindentedCollection === true) {
+ continuationIndent = 1 + /^\-((\s+)(.+?))?\s*$/.exec(this.currentLine)[2].length;
+ }
while ( this.moveToNextLine() )
{
- if (isItUnindentedCollection && !this.isStringUnIndentedCollectionItem(this.currentLine)) {
+ if (isUnindentedCollection && !this.isStringUnIndentedCollectionItem(this.currentLine) && this.getCurrentLineIndentation() != continuationIndent) {
this.moveToPreviousLine();
break;
}