Update WP and plugins
This commit is contained in:
parent
10a4713229
commit
1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions
|
|
@ -6697,48 +6697,4 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
/***/ }
|
||||
/******/ ])
|
||||
});
|
||||
;
|
||||
|
||||
// JSHINT has some GPL Compatability issues, so we are faking it out and using esprima for validation
|
||||
// Based on https://github.com/jquery/esprima/blob/gh-pages/demo/validate.js which is MIT licensed
|
||||
|
||||
var fakeJSHINT = new function() {
|
||||
var syntax, errors;
|
||||
var that = this;
|
||||
this.data = [];
|
||||
this.convertError = function( error ){
|
||||
return {
|
||||
line: error.lineNumber,
|
||||
character: error.column,
|
||||
reason: error.description,
|
||||
code: 'E'
|
||||
};
|
||||
};
|
||||
this.parse = function( code ){
|
||||
try {
|
||||
syntax = window.esprima.parse(code, { tolerant: true, loc: true });
|
||||
errors = syntax.errors;
|
||||
if ( errors.length > 0 ) {
|
||||
for ( var i = 0; i < errors.length; i++) {
|
||||
var error = errors[i];
|
||||
that.data.push( that.convertError( error ) );
|
||||
}
|
||||
} else {
|
||||
that.data = [];
|
||||
}
|
||||
} catch (e) {
|
||||
that.data.push( that.convertError( e ) );
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
window.JSHINT = function( text ){
|
||||
fakeJSHINT.parse( text );
|
||||
};
|
||||
window.JSHINT.data = function(){
|
||||
return {
|
||||
errors: fakeJSHINT.data
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
;
|
||||
43
wp-includes/js/codemirror/fakejshint.js
Normal file
43
wp-includes/js/codemirror/fakejshint.js
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
// JSHINT has some GPL Compatability issues, so we are faking it out and using esprima for validation
|
||||
// Based on https://github.com/jquery/esprima/blob/gh-pages/demo/validate.js which is MIT licensed
|
||||
|
||||
var fakeJSHINT = new function() {
|
||||
var syntax, errors;
|
||||
var that = this;
|
||||
this.data = [];
|
||||
this.convertError = function( error ){
|
||||
return {
|
||||
line: error.lineNumber,
|
||||
character: error.column,
|
||||
reason: error.description,
|
||||
code: 'E'
|
||||
};
|
||||
};
|
||||
this.parse = function( code ){
|
||||
try {
|
||||
syntax = window.esprima.parse(code, { tolerant: true, loc: true });
|
||||
errors = syntax.errors;
|
||||
if ( errors.length > 0 ) {
|
||||
for ( var i = 0; i < errors.length; i++) {
|
||||
var error = errors[i];
|
||||
that.data.push( that.convertError( error ) );
|
||||
}
|
||||
} else {
|
||||
that.data = [];
|
||||
}
|
||||
} catch (e) {
|
||||
that.data.push( that.convertError( e ) );
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
window.JSHINT = function( text ){
|
||||
fakeJSHINT.parse( text );
|
||||
};
|
||||
window.JSHINT.data = function(){
|
||||
return {
|
||||
errors: fakeJSHINT.data
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue