"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "js/lib/beautifier.js" between
js-beautify-1.13.13.tar.gz and js-beautify-1.14.0.tar.gz

About: JS Beautifier is a JavaScript (and bookmarket) beautifier.

beautifier.js  (js-beautify-1.13.13):beautifier.js  (js-beautify-1.14.0)
skipping to change at line 2450 skipping to change at line 2450
COMMENT: 'TK_COMMENT', COMMENT: 'TK_COMMENT',
DOT: 'TK_DOT', DOT: 'TK_DOT',
UNKNOWN: 'TK_UNKNOWN', UNKNOWN: 'TK_UNKNOWN',
START: BASETOKEN.START, START: BASETOKEN.START,
RAW: BASETOKEN.RAW, RAW: BASETOKEN.RAW,
EOF: BASETOKEN.EOF EOF: BASETOKEN.EOF
}; };
var directives_core = new Directives(/\/\*/, /\*\//); var directives_core = new Directives(/\/\*/, /\*\//);
var number_pattern = /0[xX][0123456789abcdefABCDEF]*|0[oO][01234567]*|0[bB][01]* |\d+n|(?:\.\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?/; var number_pattern = /0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB ][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/;
var digit = /[0-9]/; var digit = /[0-9]/;
// Dot "." must be distinguished from "..." and decimal // Dot "." must be distinguished from "..." and decimal
var dot_pattern = /[^\d\.]/; var dot_pattern = /[^\d\.]/;
var positionable_operators = ( var positionable_operators = (
">>> === !== " + ">>> === !== " +
"<< && >= ** != == <= >> || ?? |> " + "<< && >= ** != == <= >> || ?? |> " +
"< / - + > : & % ? ^ | *").split(' '); "< / - + > : & % ? ^ | *").split(' ');
skipping to change at line 4325 skipping to change at line 4325
} }
} else if (this._ch === ')') { } else if (this._ch === ')') {
if (parenLevel) { if (parenLevel) {
parenLevel--; parenLevel--;
this.outdent(); this.outdent();
} }
this.print_string(this._ch); this.print_string(this._ch);
} else if (this._ch === ',') { } else if (this._ch === ',') {
this.print_string(this._ch); this.print_string(this._ch);
this.eatWhitespace(true); this.eatWhitespace(true);
if (this._options.selector_separator_newline && !insidePropertyValue && pa renLevel === 0 && !insideAtImport) { if (this._options.selector_separator_newline && !insidePropertyValue && pa renLevel === 0 && !insideAtImport && !insideAtExtend) {
this._output.add_new_line(); this._output.add_new_line();
} else { } else {
this._output.space_before_token = true; this._output.space_before_token = true;
} }
} else if ((this._ch === '>' || this._ch === '+' || this._ch === '~') && !in sidePropertyValue && parenLevel === 0) { } else if ((this._ch === '>' || this._ch === '+' || this._ch === '~') && !in sidePropertyValue && parenLevel === 0) {
//handle combinator spacing //handle combinator spacing
if (this._options.space_around_combinator) { if (this._options.space_around_combinator) {
this._output.space_before_token = true; this._output.space_before_token = true;
this.print_string(this._ch); this.print_string(this._ch);
this._output.space_before_token = true; this._output.space_before_token = true;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)