Skip to content

Commit 69f78ff

Browse files
committed
Prepare 0.2.7 release
Fixes v0.2.6 not having up to date generated lib files.
1 parent da6a129 commit 69f78ff

File tree

6 files changed

+50
-36
lines changed

6 files changed

+50
-36
lines changed

dist/yaml.debug.js

Lines changed: 20 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/yaml.js

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ Inline = (function() {
405405
};
406406

407407
Inline.parseSequence = function(sequence, context) {
408-
var e, i, isQuoted, len, output, ref, value;
408+
var e, error, i, isQuoted, len, output, ref, value;
409409
output = [];
410410
len = sequence.length;
411411
i = context.i;
@@ -434,8 +434,8 @@ Inline = (function() {
434434
if (!isQuoted && typeof value === 'string' && (value.indexOf(': ') !== -1 || value.indexOf(":\n") !== -1)) {
435435
try {
436436
value = this.parseMapping('{' + value + '}');
437-
} catch (_error) {
438-
e = _error;
437+
} catch (error) {
438+
e = error;
439439
}
440440
}
441441
output.push(value);
@@ -709,7 +709,7 @@ Parser = (function() {
709709
}
710710

711711
Parser.prototype.parse = function(value, exceptionOnInvalidType, objectDecoder) {
712-
var alias, allowOverwrite, block, c, context, data, e, first, i, indent, isRef, j, k, key, l, lastKey, len, len1, len2, len3, lineCount, m, matches, mergeNode, n, name, parsed, parsedItem, parser, ref, ref1, ref2, refName, refValue, val, values;
712+
var alias, allowOverwrite, block, c, context, data, e, error, error1, error2, first, i, indent, isRef, j, k, key, l, lastKey, len, len1, len2, len3, lineCount, m, matches, mergeNode, n, name, parsed, parsedItem, parser, ref, ref1, ref2, refName, refValue, val, values;
713713
if (exceptionOnInvalidType == null) {
714714
exceptionOnInvalidType = false;
715715
}
@@ -777,8 +777,8 @@ Parser = (function() {
777777
Inline.configure(exceptionOnInvalidType, objectDecoder);
778778
try {
779779
key = Inline.parseScalar(values.key);
780-
} catch (_error) {
781-
e = _error;
780+
} catch (error) {
781+
e = error;
782782
e.parsedLine = this.getRealCurrentLineNb() + 1;
783783
e.snippet = this.currentLine;
784784
throw e;
@@ -886,8 +886,8 @@ Parser = (function() {
886886
if (1 === lineCount || (2 === lineCount && Utils.isEmpty(this.lines[1]))) {
887887
try {
888888
value = Inline.parse(this.lines[0], exceptionOnInvalidType, objectDecoder);
889-
} catch (_error) {
890-
e = _error;
889+
} catch (error1) {
890+
e = error1;
891891
e.parsedLine = this.getRealCurrentLineNb() + 1;
892892
e.snippet = this.currentLine;
893893
throw e;
@@ -914,8 +914,8 @@ Parser = (function() {
914914
} else if ((ref2 = Utils.ltrim(value).charAt(0)) === '[' || ref2 === '{') {
915915
try {
916916
return Inline.parse(value, exceptionOnInvalidType, objectDecoder);
917-
} catch (_error) {
918-
e = _error;
917+
} catch (error2) {
918+
e = error2;
919919
e.parsedLine = this.getRealCurrentLineNb() + 1;
920920
e.snippet = this.currentLine;
921921
throw e;
@@ -1019,7 +1019,7 @@ Parser = (function() {
10191019
};
10201020

10211021
Parser.prototype.parseValue = function(value, exceptionOnInvalidType, objectDecoder) {
1022-
var e, foldedIndent, matches, modifiers, pos, ref, ref1, val;
1022+
var e, error, error1, foldedIndent, matches, modifiers, pos, ref, ref1, val;
10231023
if (0 === value.indexOf('*')) {
10241024
pos = value.indexOf('#');
10251025
if (pos !== -1) {
@@ -1048,14 +1048,14 @@ Parser = (function() {
10481048
}
10491049
try {
10501050
return Inline.parse(value, exceptionOnInvalidType, objectDecoder);
1051-
} catch (_error) {
1052-
e = _error;
1051+
} catch (error) {
1052+
e = error;
10531053
if (((ref1 = value.charAt(0)) === '[' || ref1 === '{') && e instanceof ParseException && this.isNextLineIndented()) {
10541054
value += "\n" + this.getNextEmbedBlock();
10551055
try {
10561056
return Inline.parse(value, exceptionOnInvalidType, objectDecoder);
1057-
} catch (_error) {
1058-
e = _error;
1057+
} catch (error1) {
1058+
e = error1;
10591059
e.parsedLine = this.getRealCurrentLineNb() + 1;
10601060
e.snippet = this.currentLine;
10611061
throw e;
@@ -1206,6 +1206,9 @@ Parser = (function() {
12061206
smallestIndent = -1;
12071207
for (j = 0, len = lines.length; j < len; j++) {
12081208
line = lines[j];
1209+
if (Utils.trim(line, ' ').length === 0) {
1210+
continue;
1211+
}
12091212
indent = line.length - Utils.ltrim(line).length;
12101213
if (smallestIndent === -1 || indent < smallestIndent) {
12111214
smallestIndent = indent;
@@ -1694,7 +1697,7 @@ Utils = (function() {
16941697
name = ref[j];
16951698
try {
16961699
xhr = new ActiveXObject(name);
1697-
} catch (_error) {}
1700+
} catch (undefined) {}
16981701
}
16991702
}
17001703
}

dist/yaml.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Parser.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "yamljs",
3-
"version": "0.2.6",
3+
"version": "0.2.7",
44
"description": "Standalone JavaScript YAML 1.2 Parser & Encoder. Works under node.js and all major browsers. Also brings command line YAML/JSON conversion tools.",
55
"keywords": [
66
"yaml",

test/spec/YamlSpec.js

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)