forked from josdejong/jsoneditor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
67 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,11 +21,11 @@ | |
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
* | ||
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org | ||
* Copyright (c) 2011-2018 Jos de Jong, http://jsoneditoronline.org | ||
* | ||
* @author Jos de Jong, <[email protected]> | ||
* @version 5.26.2 | ||
* @date 2018-11-13 | ||
* @version 5.26.3 | ||
* @date 2018-12-06 | ||
*/ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
if(typeof exports === 'object' && typeof module === 'object') | ||
|
@@ -4658,13 +4658,17 @@ return /******/ (function(modules) { // webpackBootstrap | |
function next() { return jsString.charAt(i + 1); } | ||
function prev() { return jsString.charAt(i - 1); } | ||
|
||
function isWhiteSpace(c) { | ||
return c === ' ' || c === '\n' || c === '\r' || c === '\t'; | ||
} | ||
|
||
// get the last parsed non-whitespace character | ||
function lastNonWhitespace () { | ||
var p = chars.length - 1; | ||
|
||
while (p >= 0) { | ||
var pp = chars[p]; | ||
if (pp !== ' ' && pp !== '\n' && pp !== '\r' && pp !== '\t') { // non whitespace | ||
if (!isWhiteSpace(pp)) { | ||
return pp; | ||
} | ||
p--; | ||
|
@@ -4673,6 +4677,16 @@ return /******/ (function(modules) { // webpackBootstrap | |
return ''; | ||
} | ||
|
||
// get at the first next non-white space character | ||
function nextNonWhiteSpace() { | ||
var iNext = i + 1; | ||
while (iNext < jsString.length && isWhiteSpace(jsString[iNext])) { | ||
iNext++; | ||
} | ||
|
||
return jsString[iNext]; | ||
} | ||
|
||
// skip a block comment '/* ... */' | ||
function skipBlockComment () { | ||
i += 2; | ||
|
@@ -4759,7 +4773,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
} | ||
else if (c === '\u00A0' || (c >= '\u2000' && c <= '\u200A') || c === '\u202F' || c === '\u205F' || c === '\u3000') { | ||
// special white spaces (like non breaking space) | ||
chars.push(' ') | ||
chars.push(' '); | ||
i++ | ||
} | ||
else if (c === quote) { | ||
|
@@ -4777,6 +4791,10 @@ return /******/ (function(modules) { // webpackBootstrap | |
else if (c === quoteDblLeft) { | ||
parseString(quoteDblRight); | ||
} | ||
else if (c === ',' && [']', '}'].indexOf(nextNonWhiteSpace()) !== -1) { | ||
// skip trailing commas | ||
i++; | ||
} | ||
else if (/[a-zA-Z_$]/.test(c) && ['{', ','].indexOf(lastNonWhitespace()) !== -1) { | ||
// an unquoted object key (like a in '{a:2}') | ||
parseKey(); | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,11 +21,11 @@ | |
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
* | ||
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org | ||
* Copyright (c) 2011-2018 Jos de Jong, http://jsoneditoronline.org | ||
* | ||
* @author Jos de Jong, <[email protected]> | ||
* @version 5.26.2 | ||
* @date 2018-11-13 | ||
* @version 5.26.3 | ||
* @date 2018-12-06 | ||
*/ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
if(typeof exports === 'object' && typeof module === 'object') | ||
|
@@ -33300,13 +33300,17 @@ return /******/ (function(modules) { // webpackBootstrap | |
function next() { return jsString.charAt(i + 1); } | ||
function prev() { return jsString.charAt(i - 1); } | ||
|
||
function isWhiteSpace(c) { | ||
return c === ' ' || c === '\n' || c === '\r' || c === '\t'; | ||
} | ||
|
||
// get the last parsed non-whitespace character | ||
function lastNonWhitespace () { | ||
var p = chars.length - 1; | ||
|
||
while (p >= 0) { | ||
var pp = chars[p]; | ||
if (pp !== ' ' && pp !== '\n' && pp !== '\r' && pp !== '\t') { // non whitespace | ||
if (!isWhiteSpace(pp)) { | ||
return pp; | ||
} | ||
p--; | ||
|
@@ -33315,6 +33319,16 @@ return /******/ (function(modules) { // webpackBootstrap | |
return ''; | ||
} | ||
|
||
// get at the first next non-white space character | ||
function nextNonWhiteSpace() { | ||
var iNext = i + 1; | ||
while (iNext < jsString.length && isWhiteSpace(jsString[iNext])) { | ||
iNext++; | ||
} | ||
|
||
return jsString[iNext]; | ||
} | ||
|
||
// skip a block comment '/* ... */' | ||
function skipBlockComment () { | ||
i += 2; | ||
|
@@ -33401,7 +33415,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
} | ||
else if (c === '\u00A0' || (c >= '\u2000' && c <= '\u200A') || c === '\u202F' || c === '\u205F' || c === '\u3000') { | ||
// special white spaces (like non breaking space) | ||
chars.push(' ') | ||
chars.push(' '); | ||
i++ | ||
} | ||
else if (c === quote) { | ||
|
@@ -33419,6 +33433,10 @@ return /******/ (function(modules) { // webpackBootstrap | |
else if (c === quoteDblLeft) { | ||
parseString(quoteDblRight); | ||
} | ||
else if (c === ',' && [']', '}'].indexOf(nextNonWhiteSpace()) !== -1) { | ||
// skip trailing commas | ||
i++; | ||
} | ||
else if (/[a-zA-Z_$]/.test(c) && ['{', ','].indexOf(lastNonWhitespace()) !== -1) { | ||
// an unquoted object key (like a in '{a:2}') | ||
parseKey(); | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
* | ||
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org | ||
* Copyright (c) 2011-2018 Jos de Jong, http://jsoneditoronline.org | ||
* | ||
* @author Jos de Jong, <[email protected]> | ||
* @version @@version | ||
|