Skip to content

Commit

Permalink
Publish v5.26.3
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Dec 6, 2018
1 parent 6551701 commit 72ab510
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 31 deletions.
2 changes: 1 addition & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
https://github.com/josdejong/jsoneditor


## not yet released, version 5.26.3
## 2018-12-06, version 5.26.3

- Fixed #610: JSON Repair now removes trailing commas.
- Upgraded devDependency `gulp` to v4. Thanks @maestr0.
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
JSON Editor
https://github.com/josdejong/jsoneditor

Copyright (C) 2011-2017 Jos de Jong
Copyright (C) 2011-2018 Jos de Jong


Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
28 changes: 23 additions & 5 deletions dist/jsoneditor-minimalist.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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--;
Expand All @@ -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;
Expand Down Expand Up @@ -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) {
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion dist/jsoneditor-minimalist.map

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions dist/jsoneditor-minimalist.min.js

Large diffs are not rendered by default.

28 changes: 23 additions & 5 deletions dist/jsoneditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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--;
Expand All @@ -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;
Expand Down Expand Up @@ -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) {
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion dist/jsoneditor.map

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions dist/jsoneditor.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsoneditor",
"version": "5.26.2",
"version": "5.26.3",
"main": "./index",
"description": "A web-based tool to view, edit, format, and validate JSON",
"tags": [
Expand Down
2 changes: 1 addition & 1 deletion src/js/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 72ab510

Please sign in to comment.