js-beautify 1.13.11 → 1.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -19
- package/js/lib/beautifier.js +74 -71
- package/js/lib/beautifier.min.js +1 -1
- package/js/lib/beautify-css.js +16 -16
- package/js/lib/beautify-html.js +34 -34
- package/js/lib/beautify.js +45 -42
- package/js/lib/cli.js +1 -2
- package/js/src/cli.js +1 -2
- package/js/src/css/beautifier.js +1 -1
- package/js/src/html/beautifier.js +1 -1
- package/js/src/javascript/beautifier.js +5 -2
- package/js/src/javascript/tokenizer.js +2 -2
- package/package.json +8 -5
- package/CHANGELOG.md +0 -917
package/README.md
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-

|
|
1
|
+
<p align="center"><img src="https://raw.githubusercontent.com/beautify-web/js-beautify/7db71fc/web/wordmark-light.svg" height="200px" align="center" alt="JS Beautifier"/></p>
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
[](https://cdnjs.com/libraries/js-beautify)
|
|
6
|
-
[](https://www.npmjs.com/package/js-beautify)
|
|
7
|
-
[](https://www.npmjs.com/package/js-beautify?activeTab=versions)
|
|
3
|
+
<p align="center"><a href="https://github.com/beautify-web/js-beautify/actions/workflows/main.yml"><img alt="CI" src="https://github.com/beautify-web/js-beautify/workflows/CI/badge.svg"/></a> <a href="https://greenkeeper.io/" target="_blank"><img alt="Greenkeeper badge" src="https://badges.greenkeeper.io/beautify-web/js-beautify.svg"/></a></p>
|
|
8
4
|
|
|
9
|
-
|
|
10
|
-
[](https://twitter.com/intent/user?screen_name=js_beautifier)
|
|
5
|
+
<p align="center"><a href="https://pypi.python.org/pypi/jsbeautifier" target="_blank"><img alt="PyPI version" src="https://img.shields.io/pypi/v/jsbeautifier.svg"/></a> <a href="https://cdnjs.com/libraries/js-beautify" target="_blank"><img alt="CDNJS version" src="https://img.shields.io/cdnjs/v/js-beautify.svg"/></a> <a href="https://www.npmjs.com/package/js-beautify" target="_blank"><img alt="NPM @latest" src="https://img.shields.io/npm/v/js-beautify.svg"/></a> <a href="https://www.npmjs.com/package/js-beautify?activeTab=versions" target="_blank"><img alt="NPM @next" src="https://img.shields.io/npm/v/js-beautify/next.svg"/></a></p>
|
|
11
6
|
|
|
12
|
-
|
|
7
|
+
<p align="center"><a href="https://gitter.im/beautify-web/js-beautify?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge" target="_blank"><img alt="Join the chat at https://gitter.im/beautify-web/js-beautify" src="https://badges.gitter.im/Join%20Chat.svg"></a> <a href="https://twitter.com/intent/user?screen_name=js_beautifier" target="_blank"><img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/js_beautifier.svg?style=social&label=Follow"/></a></p>
|
|
13
8
|
|
|
9
|
+
<p align="center"><a href="https://www.npmjs.org/package/js-beautify" target="_blank"><img alt="NPM stats" src=https://nodei.co/npm/js-beautify.svg?downloadRank=true&downloads=true"/></a></p>
|
|
14
10
|
|
|
15
11
|
This little beautifier will reformat and re-indent bookmarklets, ugly
|
|
16
12
|
JavaScript, unpack scripts packed by Dean Edward’s popular packer,
|
|
@@ -19,6 +15,7 @@ as well as partly deobfuscate scripts processed by the npm package
|
|
|
19
15
|
|
|
20
16
|
Open [beautifier.io](https://beautifier.io/) to try it out. Options are available via the UI.
|
|
21
17
|
|
|
18
|
+
|
|
22
19
|
# Contributors Needed
|
|
23
20
|
I'm putting this front and center above because existing owners have very limited time to work on this project currently.
|
|
24
21
|
This is a popular project and widely used but it desperately needs contributors who have time to commit to fixing both
|
|
@@ -61,17 +58,17 @@ JS Beautifier is hosted on two CDN services: [cdnjs](https://cdnjs.com/libraries
|
|
|
61
58
|
|
|
62
59
|
To pull the latest version from one of these services include one set of the script tags below in your document:
|
|
63
60
|
```html
|
|
64
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.
|
|
65
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.
|
|
66
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.
|
|
61
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.1/beautify.js"></script>
|
|
62
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.1/beautify-css.js"></script>
|
|
63
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.1/beautify-html.js"></script>
|
|
67
64
|
|
|
68
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.
|
|
69
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.
|
|
70
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.
|
|
65
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.1/beautify.min.js"></script>
|
|
66
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.1/beautify-css.min.js"></script>
|
|
67
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.1/beautify-html.min.js"></script>
|
|
71
68
|
|
|
72
|
-
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.
|
|
73
|
-
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.
|
|
74
|
-
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.
|
|
69
|
+
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.14.1/js/lib/beautify.js"></script>
|
|
70
|
+
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.14.1/js/lib/beautify-css.js"></script>
|
|
71
|
+
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.14.1/js/lib/beautify-html.js"></script>
|
|
75
72
|
```
|
|
76
73
|
|
|
77
74
|
Older versions are available by changing the version number.
|
|
@@ -404,4 +401,4 @@ Thanks also to Jason Diamond, Patrick Hof, Nochum Sossonko, Andreas Schneider, D
|
|
|
404
401
|
Vasilevsky, Vital Batmanov, Ron Baldwin, Gabriel Harrison, Chris J. Shull,
|
|
405
402
|
Mathias Bynens, Vittorio Gambaletta and others.
|
|
406
403
|
|
|
407
|
-
(README.md: js-beautify@1.
|
|
404
|
+
(README.md: js-beautify@1.14.1)
|
package/js/lib/beautifier.js
CHANGED
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
else
|
|
9
9
|
root["beautifier"] = factory();
|
|
10
10
|
})(typeof self !== 'undefined' ? self : typeof windows !== 'undefined' ? window : typeof global !== 'undefined' ? global : this, function() {
|
|
11
|
-
return /******/ (()
|
|
11
|
+
return /******/ (function() { // webpackBootstrap
|
|
12
12
|
/******/ "use strict";
|
|
13
13
|
/******/ var __webpack_modules__ = ([
|
|
14
14
|
/* 0 */
|
|
15
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__)
|
|
15
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
16
16
|
|
|
17
17
|
/*jshint node:true */
|
|
18
18
|
/*
|
|
@@ -62,7 +62,7 @@ module.exports.html = style_html;
|
|
|
62
62
|
|
|
63
63
|
/***/ }),
|
|
64
64
|
/* 1 */
|
|
65
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__)
|
|
65
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
66
66
|
|
|
67
67
|
/*jshint node:true */
|
|
68
68
|
/*
|
|
@@ -94,8 +94,8 @@ module.exports.html = style_html;
|
|
|
94
94
|
|
|
95
95
|
|
|
96
96
|
|
|
97
|
-
var Beautifier = __webpack_require__(2).Beautifier,
|
|
98
|
-
Options = __webpack_require__(6).Options;
|
|
97
|
+
var Beautifier = (__webpack_require__(2).Beautifier),
|
|
98
|
+
Options = (__webpack_require__(6).Options);
|
|
99
99
|
|
|
100
100
|
function js_beautify(js_source_text, options) {
|
|
101
101
|
var beautifier = new Beautifier(js_source_text, options);
|
|
@@ -110,7 +110,7 @@ module.exports.defaultOptions = function() {
|
|
|
110
110
|
|
|
111
111
|
/***/ }),
|
|
112
112
|
/* 2 */
|
|
113
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__)
|
|
113
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
114
114
|
|
|
115
115
|
/*jshint node:true */
|
|
116
116
|
/*
|
|
@@ -142,14 +142,14 @@ module.exports.defaultOptions = function() {
|
|
|
142
142
|
|
|
143
143
|
|
|
144
144
|
|
|
145
|
-
var Output = __webpack_require__(3).Output;
|
|
146
|
-
var Token = __webpack_require__(4).Token;
|
|
145
|
+
var Output = (__webpack_require__(3).Output);
|
|
146
|
+
var Token = (__webpack_require__(4).Token);
|
|
147
147
|
var acorn = __webpack_require__(5);
|
|
148
|
-
var Options = __webpack_require__(6).Options;
|
|
149
|
-
var Tokenizer = __webpack_require__(8).Tokenizer;
|
|
150
|
-
var line_starters = __webpack_require__(8).line_starters;
|
|
151
|
-
var positionable_operators = __webpack_require__(8).positionable_operators;
|
|
152
|
-
var TOKEN = __webpack_require__(8).TOKEN;
|
|
148
|
+
var Options = (__webpack_require__(6).Options);
|
|
149
|
+
var Tokenizer = (__webpack_require__(8).Tokenizer);
|
|
150
|
+
var line_starters = (__webpack_require__(8).line_starters);
|
|
151
|
+
var positionable_operators = (__webpack_require__(8).positionable_operators);
|
|
152
|
+
var TOKEN = (__webpack_require__(8).TOKEN);
|
|
153
153
|
|
|
154
154
|
|
|
155
155
|
function in_array(what, arr) {
|
|
@@ -305,6 +305,7 @@ Beautifier.prototype.create_flags = function(flags_base, mode) {
|
|
|
305
305
|
in_case_statement: false, // switch(..){ INSIDE HERE }
|
|
306
306
|
in_case: false, // we're on the exact line with "case 0:"
|
|
307
307
|
case_body: false, // the indented case-action block
|
|
308
|
+
case_block: false, // the indented case-action block is wrapped with {}
|
|
308
309
|
indentation_level: next_indent_level,
|
|
309
310
|
alignment: 0,
|
|
310
311
|
line_indent_level: flags_base ? flags_base.line_indent_level : next_indent_level,
|
|
@@ -983,7 +984,7 @@ Beautifier.prototype.handle_word = function(current_token) {
|
|
|
983
984
|
|
|
984
985
|
if (this._flags.in_case_statement && reserved_array(current_token, ['case', 'default'])) {
|
|
985
986
|
this.print_newline();
|
|
986
|
-
if (this._flags.
|
|
987
|
+
if (!this._flags.case_block && (this._flags.case_body || this._options.jslint_happy)) {
|
|
987
988
|
// switch cases following one another
|
|
988
989
|
this.deindent();
|
|
989
990
|
}
|
|
@@ -1297,7 +1298,9 @@ Beautifier.prototype.handle_operator = function(current_token) {
|
|
|
1297
1298
|
if (this._tokens.peek().type !== TOKEN.START_BLOCK) {
|
|
1298
1299
|
this.indent();
|
|
1299
1300
|
this.print_newline();
|
|
1301
|
+
this._flags.case_block = false;
|
|
1300
1302
|
} else {
|
|
1303
|
+
this._flags.case_block = true;
|
|
1301
1304
|
this._output.space_before_token = true;
|
|
1302
1305
|
}
|
|
1303
1306
|
return;
|
|
@@ -1395,7 +1398,7 @@ Beautifier.prototype.handle_operator = function(current_token) {
|
|
|
1395
1398
|
|
|
1396
1399
|
// http://www.ecma-international.org/ecma-262/5.1/#sec-7.9.1
|
|
1397
1400
|
// if there is a newline between -- or ++ and anything else we should preserve it.
|
|
1398
|
-
if (current_token.newlines && (current_token.text === '--' || current_token.text === '++')) {
|
|
1401
|
+
if (current_token.newlines && (current_token.text === '--' || current_token.text === '++' || current_token.text === '~')) {
|
|
1399
1402
|
this.print_newline(false, true);
|
|
1400
1403
|
}
|
|
1401
1404
|
|
|
@@ -1575,7 +1578,7 @@ module.exports.Beautifier = Beautifier;
|
|
|
1575
1578
|
|
|
1576
1579
|
/***/ }),
|
|
1577
1580
|
/* 3 */
|
|
1578
|
-
/***/ ((module)
|
|
1581
|
+
/***/ (function(module) {
|
|
1579
1582
|
|
|
1580
1583
|
/*jshint node:true */
|
|
1581
1584
|
/*
|
|
@@ -2000,7 +2003,7 @@ module.exports.Output = Output;
|
|
|
2000
2003
|
|
|
2001
2004
|
/***/ }),
|
|
2002
2005
|
/* 4 */
|
|
2003
|
-
/***/ ((module)
|
|
2006
|
+
/***/ (function(module) {
|
|
2004
2007
|
|
|
2005
2008
|
/*jshint node:true */
|
|
2006
2009
|
/*
|
|
@@ -2060,7 +2063,7 @@ module.exports.Token = Token;
|
|
|
2060
2063
|
|
|
2061
2064
|
/***/ }),
|
|
2062
2065
|
/* 5 */
|
|
2063
|
-
/***/ ((__unused_webpack_module, exports)
|
|
2066
|
+
/***/ (function(__unused_webpack_module, exports) {
|
|
2064
2067
|
|
|
2065
2068
|
/* jshint node: true, curly: false */
|
|
2066
2069
|
// Parts of this section of code is taken from acorn.
|
|
@@ -2123,7 +2126,7 @@ exports.allLineBreaks = new RegExp(exports.lineBreak.source, 'g');
|
|
|
2123
2126
|
|
|
2124
2127
|
/***/ }),
|
|
2125
2128
|
/* 6 */
|
|
2126
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__)
|
|
2129
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
2127
2130
|
|
|
2128
2131
|
/*jshint node:true */
|
|
2129
2132
|
/*
|
|
@@ -2155,7 +2158,7 @@ exports.allLineBreaks = new RegExp(exports.lineBreak.source, 'g');
|
|
|
2155
2158
|
|
|
2156
2159
|
|
|
2157
2160
|
|
|
2158
|
-
var BaseOptions = __webpack_require__(7).Options;
|
|
2161
|
+
var BaseOptions = (__webpack_require__(7).Options);
|
|
2159
2162
|
|
|
2160
2163
|
var validPositionValues = ['before-newline', 'after-newline', 'preserve-newline'];
|
|
2161
2164
|
|
|
@@ -2222,7 +2225,7 @@ module.exports.Options = Options;
|
|
|
2222
2225
|
|
|
2223
2226
|
/***/ }),
|
|
2224
2227
|
/* 7 */
|
|
2225
|
-
/***/ ((module)
|
|
2228
|
+
/***/ (function(module) {
|
|
2226
2229
|
|
|
2227
2230
|
/*jshint node:true */
|
|
2228
2231
|
/*
|
|
@@ -2421,7 +2424,7 @@ module.exports.mergeOpts = _mergeOpts;
|
|
|
2421
2424
|
|
|
2422
2425
|
/***/ }),
|
|
2423
2426
|
/* 8 */
|
|
2424
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__)
|
|
2427
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
2425
2428
|
|
|
2426
2429
|
/*jshint node:true */
|
|
2427
2430
|
/*
|
|
@@ -2453,13 +2456,13 @@ module.exports.mergeOpts = _mergeOpts;
|
|
|
2453
2456
|
|
|
2454
2457
|
|
|
2455
2458
|
|
|
2456
|
-
var InputScanner = __webpack_require__(9).InputScanner;
|
|
2457
|
-
var BaseTokenizer = __webpack_require__(10).Tokenizer;
|
|
2458
|
-
var BASETOKEN = __webpack_require__(10).TOKEN;
|
|
2459
|
-
var Directives = __webpack_require__(14).Directives;
|
|
2459
|
+
var InputScanner = (__webpack_require__(9).InputScanner);
|
|
2460
|
+
var BaseTokenizer = (__webpack_require__(10).Tokenizer);
|
|
2461
|
+
var BASETOKEN = (__webpack_require__(10).TOKEN);
|
|
2462
|
+
var Directives = (__webpack_require__(14).Directives);
|
|
2460
2463
|
var acorn = __webpack_require__(5);
|
|
2461
|
-
var Pattern = __webpack_require__(13).Pattern;
|
|
2462
|
-
var TemplatablePattern = __webpack_require__(15).TemplatablePattern;
|
|
2464
|
+
var Pattern = (__webpack_require__(13).Pattern);
|
|
2465
|
+
var TemplatablePattern = (__webpack_require__(15).TemplatablePattern);
|
|
2463
2466
|
|
|
2464
2467
|
|
|
2465
2468
|
function in_array(what, arr) {
|
|
@@ -2491,7 +2494,7 @@ var TOKEN = {
|
|
|
2491
2494
|
|
|
2492
2495
|
var directives_core = new Directives(/\/\*/, /\*\//);
|
|
2493
2496
|
|
|
2494
|
-
var number_pattern = /0[xX][
|
|
2497
|
+
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_]+)?/;
|
|
2495
2498
|
|
|
2496
2499
|
var digit = /[0-9]/;
|
|
2497
2500
|
|
|
@@ -2551,7 +2554,7 @@ var Tokenizer = function(input_string, options) {
|
|
|
2551
2554
|
html_comment_end: pattern_reader.matching(/-->/),
|
|
2552
2555
|
include: pattern_reader.starting_with(/#include/).until_after(acorn.lineBreak),
|
|
2553
2556
|
shebang: pattern_reader.starting_with(/#!/).until_after(acorn.lineBreak),
|
|
2554
|
-
xml: pattern_reader.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[
|
|
2557
|
+
xml: pattern_reader.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),
|
|
2555
2558
|
single_quote: templatable.until(/['\\\n\r\u2028\u2029]/),
|
|
2556
2559
|
double_quote: templatable.until(/["\\\n\r\u2028\u2029]/),
|
|
2557
2560
|
template_text: templatable.until(/[`\\$]/),
|
|
@@ -2993,7 +2996,7 @@ module.exports.line_starters = line_starters.slice();
|
|
|
2993
2996
|
|
|
2994
2997
|
/***/ }),
|
|
2995
2998
|
/* 9 */
|
|
2996
|
-
/***/ ((module)
|
|
2999
|
+
/***/ (function(module) {
|
|
2997
3000
|
|
|
2998
3001
|
/*jshint node:true */
|
|
2999
3002
|
/*
|
|
@@ -3191,7 +3194,7 @@ module.exports.InputScanner = InputScanner;
|
|
|
3191
3194
|
|
|
3192
3195
|
/***/ }),
|
|
3193
3196
|
/* 10 */
|
|
3194
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__)
|
|
3197
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
3195
3198
|
|
|
3196
3199
|
/*jshint node:true */
|
|
3197
3200
|
/*
|
|
@@ -3223,10 +3226,10 @@ module.exports.InputScanner = InputScanner;
|
|
|
3223
3226
|
|
|
3224
3227
|
|
|
3225
3228
|
|
|
3226
|
-
var InputScanner = __webpack_require__(9).InputScanner;
|
|
3227
|
-
var Token = __webpack_require__(4).Token;
|
|
3228
|
-
var TokenStream = __webpack_require__(11).TokenStream;
|
|
3229
|
-
var WhitespacePattern = __webpack_require__(12).WhitespacePattern;
|
|
3229
|
+
var InputScanner = (__webpack_require__(9).InputScanner);
|
|
3230
|
+
var Token = (__webpack_require__(4).Token);
|
|
3231
|
+
var TokenStream = (__webpack_require__(11).TokenStream);
|
|
3232
|
+
var WhitespacePattern = (__webpack_require__(12).WhitespacePattern);
|
|
3230
3233
|
|
|
3231
3234
|
var TOKEN = {
|
|
3232
3235
|
START: 'TK_START',
|
|
@@ -3337,7 +3340,7 @@ module.exports.TOKEN = TOKEN;
|
|
|
3337
3340
|
|
|
3338
3341
|
/***/ }),
|
|
3339
3342
|
/* 11 */
|
|
3340
|
-
/***/ ((module)
|
|
3343
|
+
/***/ (function(module) {
|
|
3341
3344
|
|
|
3342
3345
|
/*jshint node:true */
|
|
3343
3346
|
/*
|
|
@@ -3421,7 +3424,7 @@ module.exports.TokenStream = TokenStream;
|
|
|
3421
3424
|
|
|
3422
3425
|
/***/ }),
|
|
3423
3426
|
/* 12 */
|
|
3424
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__)
|
|
3427
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
3425
3428
|
|
|
3426
3429
|
/*jshint node:true */
|
|
3427
3430
|
/*
|
|
@@ -3453,7 +3456,7 @@ module.exports.TokenStream = TokenStream;
|
|
|
3453
3456
|
|
|
3454
3457
|
|
|
3455
3458
|
|
|
3456
|
-
var Pattern = __webpack_require__(13).Pattern;
|
|
3459
|
+
var Pattern = (__webpack_require__(13).Pattern);
|
|
3457
3460
|
|
|
3458
3461
|
function WhitespacePattern(input_scanner, parent) {
|
|
3459
3462
|
Pattern.call(this, input_scanner, parent);
|
|
@@ -3532,7 +3535,7 @@ module.exports.WhitespacePattern = WhitespacePattern;
|
|
|
3532
3535
|
|
|
3533
3536
|
/***/ }),
|
|
3534
3537
|
/* 13 */
|
|
3535
|
-
/***/ ((module)
|
|
3538
|
+
/***/ (function(module) {
|
|
3536
3539
|
|
|
3537
3540
|
/*jshint node:true */
|
|
3538
3541
|
/*
|
|
@@ -3632,7 +3635,7 @@ module.exports.Pattern = Pattern;
|
|
|
3632
3635
|
|
|
3633
3636
|
/***/ }),
|
|
3634
3637
|
/* 14 */
|
|
3635
|
-
/***/ ((module)
|
|
3638
|
+
/***/ (function(module) {
|
|
3636
3639
|
|
|
3637
3640
|
/*jshint node:true */
|
|
3638
3641
|
/*
|
|
@@ -3700,7 +3703,7 @@ module.exports.Directives = Directives;
|
|
|
3700
3703
|
|
|
3701
3704
|
/***/ }),
|
|
3702
3705
|
/* 15 */
|
|
3703
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__)
|
|
3706
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
3704
3707
|
|
|
3705
3708
|
/*jshint node:true */
|
|
3706
3709
|
/*
|
|
@@ -3732,7 +3735,7 @@ module.exports.Directives = Directives;
|
|
|
3732
3735
|
|
|
3733
3736
|
|
|
3734
3737
|
|
|
3735
|
-
var Pattern = __webpack_require__(13).Pattern;
|
|
3738
|
+
var Pattern = (__webpack_require__(13).Pattern);
|
|
3736
3739
|
|
|
3737
3740
|
|
|
3738
3741
|
var template_names = {
|
|
@@ -3917,7 +3920,7 @@ module.exports.TemplatablePattern = TemplatablePattern;
|
|
|
3917
3920
|
|
|
3918
3921
|
/***/ }),
|
|
3919
3922
|
/* 16 */
|
|
3920
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__)
|
|
3923
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
3921
3924
|
|
|
3922
3925
|
/*jshint node:true */
|
|
3923
3926
|
/*
|
|
@@ -3949,8 +3952,8 @@ module.exports.TemplatablePattern = TemplatablePattern;
|
|
|
3949
3952
|
|
|
3950
3953
|
|
|
3951
3954
|
|
|
3952
|
-
var Beautifier = __webpack_require__(17).Beautifier,
|
|
3953
|
-
Options = __webpack_require__(18).Options;
|
|
3955
|
+
var Beautifier = (__webpack_require__(17).Beautifier),
|
|
3956
|
+
Options = (__webpack_require__(18).Options);
|
|
3954
3957
|
|
|
3955
3958
|
function css_beautify(source_text, options) {
|
|
3956
3959
|
var beautifier = new Beautifier(source_text, options);
|
|
@@ -3965,7 +3968,7 @@ module.exports.defaultOptions = function() {
|
|
|
3965
3968
|
|
|
3966
3969
|
/***/ }),
|
|
3967
3970
|
/* 17 */
|
|
3968
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__)
|
|
3971
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
3969
3972
|
|
|
3970
3973
|
/*jshint node:true */
|
|
3971
3974
|
/*
|
|
@@ -3997,10 +4000,10 @@ module.exports.defaultOptions = function() {
|
|
|
3997
4000
|
|
|
3998
4001
|
|
|
3999
4002
|
|
|
4000
|
-
var Options = __webpack_require__(18).Options;
|
|
4001
|
-
var Output = __webpack_require__(3).Output;
|
|
4002
|
-
var InputScanner = __webpack_require__(9).InputScanner;
|
|
4003
|
-
var Directives = __webpack_require__(14).Directives;
|
|
4003
|
+
var Options = (__webpack_require__(18).Options);
|
|
4004
|
+
var Output = (__webpack_require__(3).Output);
|
|
4005
|
+
var InputScanner = (__webpack_require__(9).InputScanner);
|
|
4006
|
+
var Directives = (__webpack_require__(14).Directives);
|
|
4004
4007
|
|
|
4005
4008
|
var directives_core = new Directives(/\/\*/, /\*\//);
|
|
4006
4009
|
|
|
@@ -4402,7 +4405,7 @@ Beautifier.prototype.beautify = function() {
|
|
|
4402
4405
|
} else if (this._ch === ',') {
|
|
4403
4406
|
this.print_string(this._ch);
|
|
4404
4407
|
this.eatWhitespace(true);
|
|
4405
|
-
if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport) {
|
|
4408
|
+
if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport && !insideAtExtend) {
|
|
4406
4409
|
this._output.add_new_line();
|
|
4407
4410
|
} else {
|
|
4408
4411
|
this._output.space_before_token = true;
|
|
@@ -4451,7 +4454,7 @@ module.exports.Beautifier = Beautifier;
|
|
|
4451
4454
|
|
|
4452
4455
|
/***/ }),
|
|
4453
4456
|
/* 18 */
|
|
4454
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__)
|
|
4457
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
4455
4458
|
|
|
4456
4459
|
/*jshint node:true */
|
|
4457
4460
|
/*
|
|
@@ -4483,7 +4486,7 @@ module.exports.Beautifier = Beautifier;
|
|
|
4483
4486
|
|
|
4484
4487
|
|
|
4485
4488
|
|
|
4486
|
-
var BaseOptions = __webpack_require__(7).Options;
|
|
4489
|
+
var BaseOptions = (__webpack_require__(7).Options);
|
|
4487
4490
|
|
|
4488
4491
|
function Options(options) {
|
|
4489
4492
|
BaseOptions.call(this, options, 'css');
|
|
@@ -4513,7 +4516,7 @@ module.exports.Options = Options;
|
|
|
4513
4516
|
|
|
4514
4517
|
/***/ }),
|
|
4515
4518
|
/* 19 */
|
|
4516
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__)
|
|
4519
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
4517
4520
|
|
|
4518
4521
|
/*jshint node:true */
|
|
4519
4522
|
/*
|
|
@@ -4545,8 +4548,8 @@ module.exports.Options = Options;
|
|
|
4545
4548
|
|
|
4546
4549
|
|
|
4547
4550
|
|
|
4548
|
-
var Beautifier = __webpack_require__(20).Beautifier,
|
|
4549
|
-
Options = __webpack_require__(21).Options;
|
|
4551
|
+
var Beautifier = (__webpack_require__(20).Beautifier),
|
|
4552
|
+
Options = (__webpack_require__(21).Options);
|
|
4550
4553
|
|
|
4551
4554
|
function style_html(html_source, options, js_beautify, css_beautify) {
|
|
4552
4555
|
var beautifier = new Beautifier(html_source, options, js_beautify, css_beautify);
|
|
@@ -4561,7 +4564,7 @@ module.exports.defaultOptions = function() {
|
|
|
4561
4564
|
|
|
4562
4565
|
/***/ }),
|
|
4563
4566
|
/* 20 */
|
|
4564
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__)
|
|
4567
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
4565
4568
|
|
|
4566
4569
|
/*jshint node:true */
|
|
4567
4570
|
/*
|
|
@@ -4593,10 +4596,10 @@ module.exports.defaultOptions = function() {
|
|
|
4593
4596
|
|
|
4594
4597
|
|
|
4595
4598
|
|
|
4596
|
-
var Options = __webpack_require__(21).Options;
|
|
4597
|
-
var Output = __webpack_require__(3).Output;
|
|
4598
|
-
var Tokenizer = __webpack_require__(22).Tokenizer;
|
|
4599
|
-
var TOKEN = __webpack_require__(22).TOKEN;
|
|
4599
|
+
var Options = (__webpack_require__(21).Options);
|
|
4600
|
+
var Output = (__webpack_require__(3).Output);
|
|
4601
|
+
var Tokenizer = (__webpack_require__(22).Tokenizer);
|
|
4602
|
+
var TOKEN = (__webpack_require__(22).TOKEN);
|
|
4600
4603
|
|
|
4601
4604
|
var lineBreak = /\r\n|[\r\n]/;
|
|
4602
4605
|
var allLineBreaks = /\r\n|[\r\n]/g;
|
|
@@ -5177,7 +5180,7 @@ var TagOpenParserToken = function(parent, raw_token) {
|
|
|
5177
5180
|
|
|
5178
5181
|
// handle "{{#> myPartial}}
|
|
5179
5182
|
if (raw_token.text === '{{#>' && this.tag_check === '>' && raw_token.next !== null) {
|
|
5180
|
-
this.tag_check = raw_token.next.text;
|
|
5183
|
+
this.tag_check = raw_token.next.text.split(' ')[0];
|
|
5181
5184
|
}
|
|
5182
5185
|
}
|
|
5183
5186
|
this.tag_check = this.tag_check.toLowerCase();
|
|
@@ -5432,7 +5435,7 @@ module.exports.Beautifier = Beautifier;
|
|
|
5432
5435
|
|
|
5433
5436
|
/***/ }),
|
|
5434
5437
|
/* 21 */
|
|
5435
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__)
|
|
5438
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
5436
5439
|
|
|
5437
5440
|
/*jshint node:true */
|
|
5438
5441
|
/*
|
|
@@ -5464,7 +5467,7 @@ module.exports.Beautifier = Beautifier;
|
|
|
5464
5467
|
|
|
5465
5468
|
|
|
5466
5469
|
|
|
5467
|
-
var BaseOptions = __webpack_require__(7).Options;
|
|
5470
|
+
var BaseOptions = (__webpack_require__(7).Options);
|
|
5468
5471
|
|
|
5469
5472
|
function Options(options) {
|
|
5470
5473
|
BaseOptions.call(this, options, 'html');
|
|
@@ -5529,7 +5532,7 @@ module.exports.Options = Options;
|
|
|
5529
5532
|
|
|
5530
5533
|
/***/ }),
|
|
5531
5534
|
/* 22 */
|
|
5532
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__)
|
|
5535
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
5533
5536
|
|
|
5534
5537
|
/*jshint node:true */
|
|
5535
5538
|
/*
|
|
@@ -5561,11 +5564,11 @@ module.exports.Options = Options;
|
|
|
5561
5564
|
|
|
5562
5565
|
|
|
5563
5566
|
|
|
5564
|
-
var BaseTokenizer = __webpack_require__(10).Tokenizer;
|
|
5565
|
-
var BASETOKEN = __webpack_require__(10).TOKEN;
|
|
5566
|
-
var Directives = __webpack_require__(14).Directives;
|
|
5567
|
-
var TemplatablePattern = __webpack_require__(15).TemplatablePattern;
|
|
5568
|
-
var Pattern = __webpack_require__(13).Pattern;
|
|
5567
|
+
var BaseTokenizer = (__webpack_require__(10).Tokenizer);
|
|
5568
|
+
var BASETOKEN = (__webpack_require__(10).TOKEN);
|
|
5569
|
+
var Directives = (__webpack_require__(14).Directives);
|
|
5570
|
+
var TemplatablePattern = (__webpack_require__(15).TemplatablePattern);
|
|
5571
|
+
var Pattern = (__webpack_require__(13).Pattern);
|
|
5569
5572
|
|
|
5570
5573
|
var TOKEN = {
|
|
5571
5574
|
TAG_OPEN: 'TK_TAG_OPEN',
|