Skip to content

Commit

Permalink
finish updating rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
mhkeller committed Oct 12, 2017
1 parent dd8dae6 commit 853354a
Show file tree
Hide file tree
Showing 8 changed files with 2,639 additions and 5,557 deletions.
18 changes: 14 additions & 4 deletions dist/indian-ocean.browser.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -3027,7 +3027,7 @@ function readBlockMapping(state, nodeIndent, flowIndent) {
atExplicitKey = false;
allowCompact = true;
} else {
throwError(state, 'incomplete explicit mapping pair; a key node is missed');
throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');
}

state.position += 1;
Expand Down Expand Up @@ -4034,11 +4034,21 @@ function foldLine(line, width) {
// Escapes a double-quoted string.
function escapeString(string) {
var result = '';
var char;
var char, nextChar;
var escapeSeq;

for (var i = 0; i < string.length; i++) {
char = string.charCodeAt(i);
// Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates").
if (char >= 0xD800 && char <= 0xDBFF /* high surrogate */) {
nextChar = string.charCodeAt(i + 1);
if (nextChar >= 0xDC00 && nextChar <= 0xDFFF /* low surrogate */) {
// Combine the surrogate pair and store it escaped.
result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000);
// Advance index one extra since we already used that char here.
i++;continue;
}
}
escapeSeq = ESCAPE_SEQUENCES[char];
result += !escapeSeq && isPrintable(char) ? string[i] : escapeSeq || encodeHex(char);
}
Expand Down Expand Up @@ -4102,7 +4112,7 @@ function writeFlowMapping(state, level, object) {
pairBuffer;

for (index = 0, length = objectKeyList.length; index < length; index += 1) {
pairBuffer = '';
pairBuffer = state.condenseFlow ? '"' : '';

if (index !== 0) pairBuffer += ', ';

Expand All @@ -4115,7 +4125,7 @@ function writeFlowMapping(state, level, object) {

if (state.dump.length > 1024) pairBuffer += '? ';

pairBuffer += state.dump + ':' + (state.condenseFlow ? '' : ' ');
pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' ');

if (!writeNode(state, level, objectValue, false, false)) {
continue; // Skip this pair because of invalid value.
Expand Down
18 changes: 14 additions & 4 deletions dist/indian-ocean.js
Original file line number Diff line number Diff line change
Expand Up @@ -3033,7 +3033,7 @@ function readBlockMapping(state, nodeIndent, flowIndent) {
atExplicitKey = false;
allowCompact = true;
} else {
throwError(state, 'incomplete explicit mapping pair; a key node is missed');
throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');
}

state.position += 1;
Expand Down Expand Up @@ -4040,11 +4040,21 @@ function foldLine(line, width) {
// Escapes a double-quoted string.
function escapeString(string) {
var result = '';
var char;
var char, nextChar;
var escapeSeq;

for (var i = 0; i < string.length; i++) {
char = string.charCodeAt(i);
// Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates").
if (char >= 0xD800 && char <= 0xDBFF /* high surrogate */) {
nextChar = string.charCodeAt(i + 1);
if (nextChar >= 0xDC00 && nextChar <= 0xDFFF /* low surrogate */) {
// Combine the surrogate pair and store it escaped.
result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000);
// Advance index one extra since we already used that char here.
i++;continue;
}
}
escapeSeq = ESCAPE_SEQUENCES[char];
result += !escapeSeq && isPrintable(char) ? string[i] : escapeSeq || encodeHex(char);
}
Expand Down Expand Up @@ -4108,7 +4118,7 @@ function writeFlowMapping(state, level, object) {
pairBuffer;

for (index = 0, length = objectKeyList.length; index < length; index += 1) {
pairBuffer = '';
pairBuffer = state.condenseFlow ? '"' : '';

if (index !== 0) pairBuffer += ', ';

Expand All @@ -4121,7 +4131,7 @@ function writeFlowMapping(state, level, object) {

if (state.dump.length > 1024) pairBuffer += '? ';

pairBuffer += state.dump + ':' + (state.condenseFlow ? '' : ' ');
pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' ');

if (!writeNode(state, level, objectValue, false, false)) {
continue; // Skip this pair because of invalid value.
Expand Down
6 changes: 3 additions & 3 deletions dist/indian-ocean.min.js

Large diffs are not rendered by default.

18 changes: 14 additions & 4 deletions dist/indian-ocean.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -4141,7 +4141,7 @@ function readBlockMapping(state, nodeIndent, flowIndent) {
atExplicitKey = false;
allowCompact = true;
} else {
throwError(state, 'incomplete explicit mapping pair; a key node is missed');
throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');
}

state.position += 1;
Expand Down Expand Up @@ -5148,11 +5148,21 @@ function foldLine(line, width) {
// Escapes a double-quoted string.
function escapeString(string) {
var result = '';
var char;
var char, nextChar;
var escapeSeq;

for (var i = 0; i < string.length; i++) {
char = string.charCodeAt(i);
// Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates").
if (char >= 0xD800 && char <= 0xDBFF /* high surrogate */) {
nextChar = string.charCodeAt(i + 1);
if (nextChar >= 0xDC00 && nextChar <= 0xDFFF /* low surrogate */) {
// Combine the surrogate pair and store it escaped.
result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000);
// Advance index one extra since we already used that char here.
i++;continue;
}
}
escapeSeq = ESCAPE_SEQUENCES[char];
result += !escapeSeq && isPrintable(char) ? string[i] : escapeSeq || encodeHex(char);
}
Expand Down Expand Up @@ -5216,7 +5226,7 @@ function writeFlowMapping(state, level, object) {
pairBuffer;

for (index = 0, length = objectKeyList.length; index < length; index += 1) {
pairBuffer = '';
pairBuffer = state.condenseFlow ? '"' : '';

if (index !== 0) pairBuffer += ', ';

Expand All @@ -5229,7 +5239,7 @@ function writeFlowMapping(state, level, object) {

if (state.dump.length > 1024) pairBuffer += '? ';

pairBuffer += state.dump + ':' + (state.condenseFlow ? '' : ' ');
pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' ');

if (!writeNode(state, level, objectValue, false, false)) {
continue; // Skip this pair because of invalid value.
Expand Down
1 change: 0 additions & 1 deletion index.node.stub.js

This file was deleted.

0 comments on commit 853354a

Please sign in to comment.