js-beautify 1.9.0-beta4 → 1.10.0

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/CHANGELOG.md CHANGED
@@ -1,4 +1,78 @@
1
1
  # Changelog
2
+ ## v1.10.0
3
+
4
+ ### Description
5
+ # Description
6
+ * Added `templating` setting to control when template languages are recognized. All languages are off by default in Javascript and on by default in HTML.
7
+ * Thanks to @HanabishiRecca, @averydev, @kalbasit, @asteinha for contributions
8
+
9
+ https://github.com/beautify-web/js-beautify/compare/v1.9.1...v1.10.0
10
+
11
+
12
+
13
+ ### Closed Issues
14
+ * beautifying scss selector with colon in it adds space ([#1667](https://github.com/beautify-web/js-beautify/issues/1667))
15
+ * Javascript multiline comments duplicates ([#1663](https://github.com/beautify-web/js-beautify/issues/1663))
16
+ * Tokenizer crashes if the input terminates with a dot character. ([#1658](https://github.com/beautify-web/js-beautify/issues/1658))
17
+ * stop reformatting valid css \\! into invalid \\ ! ([#1656](https://github.com/beautify-web/js-beautify/pull/1656))
18
+ * wrong indent for unclosed <? - need to support disabling templating ([#1647](https://github.com/beautify-web/js-beautify/issues/1647))
19
+ * Beautify inserts space before exclamation mark in comment <!-- in css <style> ([#1641](https://github.com/beautify-web/js-beautify/issues/1641))
20
+ * 'less' mixins parameter formatting problem ([#1582](https://github.com/beautify-web/js-beautify/issues/1582))
21
+ * Change css tests to use 4 space indenting instead of tabs ([#1527](https://github.com/beautify-web/js-beautify/issues/1527))
22
+ * Braces after case get pushed onto new line ([#1357](https://github.com/beautify-web/js-beautify/issues/1357))
23
+ * Extra space in pseudo-elements and pseudo-classes selectors ([#1233](https://github.com/beautify-web/js-beautify/issues/1233))
24
+ * LESS formatting - mixins with multiple variables ([#1018](https://github.com/beautify-web/js-beautify/issues/1018))
25
+ * Bug in less format ([#842](https://github.com/beautify-web/js-beautify/issues/842))
26
+
27
+
28
+ ## v1.9.1
29
+
30
+ ### Description
31
+
32
+
33
+ ### Closed Issues
34
+ * nested table not beautified correctly ([#1649](https://github.com/beautify-web/js-beautify/issues/1649))
35
+ * Add an option to preserve indentation on empty lines ([#1322](https://github.com/beautify-web/js-beautify/issues/1322))
36
+
37
+
38
+ ## v1.9.0
39
+
40
+ ### Description
41
+ # Description
42
+ * Fixed Tab indenting - when tabs indenting enabled, they are used universally. Also, tab size customizable: 8-space tabs would mean each tab is treated as 8 spaces. (#1294, #1551)
43
+ * Accurate line wrapping - Layout always wraps when line length exceed specified column, unless wrapping would not reduce line length. (#284, #1238)
44
+ * Improved Template handling in HTML - Go, Django, Handlebars, ERB/EJS/ASP, PHP (still only handlebars indenting) (#881, #1602, #1620)
45
+ * Improved Template handling in Javascript - ERB/EJS/ASP, PHP (no indenting, no Django or Handlebars due to potential syntax conflicts for curly braces) (#1377)
46
+ * Fixed indenting of mustache inverted conditionals (#1623 @e2tha-e)
47
+ * Fixed indenting for HTML tags with option end tags (#1213)
48
+
49
+ https://github.com/beautify-web/js-beautify/compare/v1.8.9...v1.9.0
50
+
51
+
52
+
53
+ ### Closed Issues
54
+ * Incorrect indentation of `^` inverted section tags in Handlebars/Mustache code ([#1623](https://github.com/beautify-web/js-beautify/issues/1623))
55
+ * PHP In HTML Attributes ([#1620](https://github.com/beautify-web/js-beautify/issues/1620))
56
+ * DeanEdward python unpacker offset problem ([#1616](https://github.com/beautify-web/js-beautify/issues/1616))
57
+ * CLI on Windows doesn't accept -f - for stdin? ([#1609](https://github.com/beautify-web/js-beautify/issues/1609))
58
+ * HTML type attribute breaks JavaScript beautification? ([#1606](https://github.com/beautify-web/js-beautify/issues/1606))
59
+ * Use of global MODE before declaration caused uglify problem ([#1604](https://github.com/beautify-web/js-beautify/issues/1604))
60
+ * When building html tags using Mustache variables, extra whitespace is added after opening arrow ([#1602](https://github.com/beautify-web/js-beautify/issues/1602))
61
+ * <script type="text/html">isnot abled to be beautified ([#1591](https://github.com/beautify-web/js-beautify/issues/1591))
62
+ * _get_full_indent undefined ([#1590](https://github.com/beautify-web/js-beautify/issues/1590))
63
+ * Website "autodetect" setting doesn't distinguish css vs javascript ([#1565](https://github.com/beautify-web/js-beautify/issues/1565))
64
+ * Add setting to keep HTML tag text content unformatted or ignore custom delimiters ([#1560](https://github.com/beautify-web/js-beautify/issues/1560))
65
+ * HTML auto formatting using spaces instead of tabs ([#1551](https://github.com/beautify-web/js-beautify/issues/1551))
66
+ * Unclosed single quote in php tag causes formatting changes which break php code ([#1377](https://github.com/beautify-web/js-beautify/issues/1377))
67
+ * Using tabs when wrapping attributes and wrapping if needed ([#1294](https://github.com/beautify-web/js-beautify/issues/1294))
68
+ * HTML --wrap-attributes doesn't respect --wrap-line-length ([#1238](https://github.com/beautify-web/js-beautify/issues/1238))
69
+ * Bad indent level(HTML) ([#1213](https://github.com/beautify-web/js-beautify/issues/1213))
70
+ * js-beautify produces invalid code for variables with Unicode escape sequences ([#1211](https://github.com/beautify-web/js-beautify/issues/1211))
71
+ * support vuejs ([#1154](https://github.com/beautify-web/js-beautify/issues/1154))
72
+ * Go templates in HTML ([#881](https://github.com/beautify-web/js-beautify/issues/881))
73
+ * Better behavior for javascript --wrap-line-length ([#284](https://github.com/beautify-web/js-beautify/issues/284))
74
+
75
+
2
76
  ## v1.8.9
3
77
 
4
78
  ### Description
@@ -8,6 +82,7 @@
8
82
  * Won't run from CLI - bad option name `files` ([#1583](https://github.com/beautify-web/js-beautify/issues/1583))
9
83
  * in the .vue file `space_after_anon_function` is invalid ([#1425](https://github.com/beautify-web/js-beautify/issues/1425))
10
84
  * Add function default_options() to beautifier.js ([#1364](https://github.com/beautify-web/js-beautify/issues/1364))
85
+ * fix: Missing space before function parentheses ? ([#1077](https://github.com/beautify-web/js-beautify/issues/1077))
11
86
  * Support globs in CLI ([#787](https://github.com/beautify-web/js-beautify/issues/787))
12
87
 
13
88
 
@@ -58,6 +133,29 @@ Broader adoption of 1.8.x revealed a few more high priority fixes
58
133
  * unindent_chained_methods broken ([#1533](https://github.com/beautify-web/js-beautify/issues/1533))
59
134
 
60
135
 
136
+ ## v1.8.3
137
+
138
+ ### Description
139
+
140
+
141
+ ### Closed Issues
142
+ * Missing Bower Assets ([#1521](https://github.com/beautify-web/js-beautify/issues/1521))
143
+ * Javascript ternary breaked with `await` ([#1519](https://github.com/beautify-web/js-beautify/issues/1519))
144
+ * Object property indented after `await` ([#1517](https://github.com/beautify-web/js-beautify/issues/1517))
145
+ * Handlebars formatting problems ([#870](https://github.com/beautify-web/js-beautify/issues/870))
146
+ * beautify.js doesn't have indent_level option ([#724](https://github.com/beautify-web/js-beautify/issues/724))
147
+
148
+
149
+ ## v1.8.1
150
+
151
+ ### Description
152
+
153
+
154
+ ### Closed Issues
155
+ * Why npm is a dependency? ([#1516](https://github.com/beautify-web/js-beautify/issues/1516))
156
+ * indent_inner_html not working in v1.8.0 ([#1514](https://github.com/beautify-web/js-beautify/issues/1514))
157
+
158
+
61
159
  ## v1.8.0
62
160
 
63
161
  ### Description
@@ -119,6 +217,76 @@ Highlights:
119
217
  * Add "Create Issue for Unexpected Output" button to website ([#1371](https://github.com/beautify-web/js-beautify/issues/1371))
120
218
  * Add combobox to control type of beautification ([#1370](https://github.com/beautify-web/js-beautify/issues/1370))
121
219
  * Add Options textbox to website for debugging ([#1369](https://github.com/beautify-web/js-beautify/issues/1369))
220
+ * Python version fails to properly beautify packed code ([#1367](https://github.com/beautify-web/js-beautify/issues/1367))
221
+ * preserve-newline doesn't work for text blocks inside tags ([#1352](https://github.com/beautify-web/js-beautify/issues/1352))
222
+ * How to keep comments on their own lines after formating ([#1348](https://github.com/beautify-web/js-beautify/issues/1348))
223
+ * Beautification of Multiline PHP ([#1346](https://github.com/beautify-web/js-beautify/issues/1346))
224
+ * Beautification of PHP with echo short tags ([#1339](https://github.com/beautify-web/js-beautify/issues/1339))
225
+ * <button> with force-expand-multiline formatting bug ([#1335](https://github.com/beautify-web/js-beautify/issues/1335))
226
+ * js-beautify 1.7.5 breaks some correct JS code when run with -X ([#1334](https://github.com/beautify-web/js-beautify/issues/1334))
227
+ * URGENT: @extend with :hover, :focus and so on... ([#1331](https://github.com/beautify-web/js-beautify/issues/1331))
228
+ * JSBeautify options for programmatic use? ([#1327](https://github.com/beautify-web/js-beautify/issues/1327))
229
+ * js-beautify: fix handling for --eol and --outfile ([#1315](https://github.com/beautify-web/js-beautify/pull/1315))
230
+ * Note that `gsort` is GNU sort ([#1314](https://github.com/beautify-web/js-beautify/issues/1314))
231
+ * `pip` doesn't use same version as `/usr/bin/env python` ([#1312](https://github.com/beautify-web/js-beautify/issues/1312))
232
+ * Negative numbers removes newlines in arrays ([#1288](https://github.com/beautify-web/js-beautify/issues/1288))
233
+ * Wrap and align html attributes when line reaches wrap-line-length ([#1285](https://github.com/beautify-web/js-beautify/issues/1285))
234
+ * Javascript ++ Operator get wrong indent ([#1283](https://github.com/beautify-web/js-beautify/issues/1283))
235
+ * Generate js-beautify executable properly on windows when installed from PIP ([#1266](https://github.com/beautify-web/js-beautify/issues/1266))
236
+ * Add or preserve empty line between nested SCSS rules ([#1258](https://github.com/beautify-web/js-beautify/issues/1258))
237
+ * Create beta channel for releases ([#1255](https://github.com/beautify-web/js-beautify/issues/1255))
238
+ * Add install tests for packages ([#1254](https://github.com/beautify-web/js-beautify/issues/1254))
239
+ * Formatting slow when line wrap is set ([#1231](https://github.com/beautify-web/js-beautify/issues/1231))
240
+ * [!true && ...] Negated expressions in an array get collapsed into a single line ([#1229](https://github.com/beautify-web/js-beautify/issues/1229))
241
+ * await import(...) ([#1228](https://github.com/beautify-web/js-beautify/issues/1228))
242
+ * The result of "Format document" is weird of certain HTML content. ([#1223](https://github.com/beautify-web/js-beautify/issues/1223))
243
+ * (next_tag || "").match is not a function ([#1202](https://github.com/beautify-web/js-beautify/issues/1202))
244
+ * html.format.wrapAttributes on handlebars template ([#1199](https://github.com/beautify-web/js-beautify/issues/1199))
245
+ * Don't indent unclosed HTML tags containing server directives "<@" ([#1193](https://github.com/beautify-web/js-beautify/issues/1193))
246
+ * `force-expand-multiline` doesn't work as expected ([#1186](https://github.com/beautify-web/js-beautify/issues/1186))
247
+ * HTML text content formatted incorrectly ([#1184](https://github.com/beautify-web/js-beautify/issues/1184))
248
+ * Content deleted when formatting with indent_handlebars: true ([#1174](https://github.com/beautify-web/js-beautify/issues/1174))
249
+ * Nested span tags not indenting properly ([#1167](https://github.com/beautify-web/js-beautify/issues/1167))
250
+ * SCSS Comment Issue ([#1165](https://github.com/beautify-web/js-beautify/issues/1165))
251
+ * Less function parameters are wrapped unexpected ([#1156](https://github.com/beautify-web/js-beautify/issues/1156))
252
+ * Support underscore templates ([#1130](https://github.com/beautify-web/js-beautify/issues/1130))
253
+ * html-bar/handlebar {{else if}} block is indented ([#1123](https://github.com/beautify-web/js-beautify/issues/1123))
254
+ * Wrap line length, first line not correct ([#1122](https://github.com/beautify-web/js-beautify/issues/1122))
255
+ * TypeError: Cannot read property 'replace' of undefined ([#1120](https://github.com/beautify-web/js-beautify/issues/1120))
256
+ * Strange behaviours of formatting for double spans ([#1113](https://github.com/beautify-web/js-beautify/issues/1113))
257
+ * Missing space between "else" and "if". ([#1107](https://github.com/beautify-web/js-beautify/issues/1107))
258
+ * invalid indentation for html code ([#1098](https://github.com/beautify-web/js-beautify/issues/1098))
259
+ * HTML "select" tags have too much indentation ([#1097](https://github.com/beautify-web/js-beautify/issues/1097))
260
+ * Formatting breaks apart unquoted attribute ([#1094](https://github.com/beautify-web/js-beautify/issues/1094))
261
+ * HTML formatting wraps ending block tag for no reason with nested inline elements ([#1041](https://github.com/beautify-web/js-beautify/issues/1041))
262
+ * Ignore expressions in handlebars tags. ([#1040](https://github.com/beautify-web/js-beautify/issues/1040))
263
+ * not correctly joining lines for HTML ([#1033](https://github.com/beautify-web/js-beautify/issues/1033))
264
+ * Fails to format SVG files properly ([#1027](https://github.com/beautify-web/js-beautify/issues/1027))
265
+ * Template tags with new lines in them ([#1016](https://github.com/beautify-web/js-beautify/issues/1016))
266
+ * Span tags do not re-indent correctly ([#1010](https://github.com/beautify-web/js-beautify/issues/1010))
267
+ * Error in --eol processing in python ([#987](https://github.com/beautify-web/js-beautify/issues/987))
268
+ * Extra space added when quote is present ([#943](https://github.com/beautify-web/js-beautify/issues/943))
269
+ * weird formatting for HTML5 <tr> ([#882](https://github.com/beautify-web/js-beautify/issues/882))
270
+ * Respect non-breaking spaces ([#869](https://github.com/beautify-web/js-beautify/issues/869))
271
+ * Media Queries style issue ([#863](https://github.com/beautify-web/js-beautify/issues/863))
272
+ * Weird Beautify Style? ([#857](https://github.com/beautify-web/js-beautify/issues/857))
273
+ * "unformatted" paradigm broken, "unformatted" and "inline" are not the same ([#841](https://github.com/beautify-web/js-beautify/issues/841))
274
+ * Increment/Decrement Operator on object property extra indent on subsequent line ([#814](https://github.com/beautify-web/js-beautify/issues/814))
275
+ * Inconsistence of "newline_between_rules" with @import or @media ([#769](https://github.com/beautify-web/js-beautify/issues/769))
276
+ * Unexpected line break in "-1" ([#740](https://github.com/beautify-web/js-beautify/issues/740))
277
+ * Blank line before and after CSS / JS comments ([#736](https://github.com/beautify-web/js-beautify/issues/736))
278
+ * newline_between_rules support for Sass (enhancement) ([#657](https://github.com/beautify-web/js-beautify/issues/657))
279
+ * CSS comment spacing disregards `newline_between_rules`, `selector_separator_newline` ([#645](https://github.com/beautify-web/js-beautify/issues/645))
280
+ * HTML: wrap_line_length may produce buggy spaces ([#607](https://github.com/beautify-web/js-beautify/issues/607))
281
+ * Wrong code formatting using Handlebars ([#576](https://github.com/beautify-web/js-beautify/issues/576))
282
+ * option to ignore section or line in html ([#575](https://github.com/beautify-web/js-beautify/issues/575))
283
+ * Tokenize html before beautifying ([#546](https://github.com/beautify-web/js-beautify/issues/546))
284
+ * Extra newline is inserted after the comment line instead of before it ([#531](https://github.com/beautify-web/js-beautify/issues/531))
285
+ * html-beautify's max_preserve_newlines preserves one new line too much ([#517](https://github.com/beautify-web/js-beautify/issues/517))
286
+ * Disable/Skip HTML single-line comment ([#426](https://github.com/beautify-web/js-beautify/issues/426))
287
+ * Add tests for various javascript dependency loading libraries ([#360](https://github.com/beautify-web/js-beautify/issues/360))
288
+ * Formatting of @import broken ([#358](https://github.com/beautify-web/js-beautify/issues/358))
289
+ * newline removal seems not to work properly (in sublime text 3 on xp pro sp3) ([#348](https://github.com/beautify-web/js-beautify/issues/348))
122
290
 
123
291
 
124
292
  ## v1.7.5
@@ -413,6 +581,29 @@ Fixes for regressions found in 1.6.0
413
581
  * Cannot copy more than 1000 characters out of CodeMirror buffer ([#768](https://github.com/beautify-web/js-beautify/issues/768))
414
582
  * Missing 'var' in beautify-html.js; breaks strict mode ([#763](https://github.com/beautify-web/js-beautify/issues/763))
415
583
  * Fix typo in the example javascript code of index.html ([#753](https://github.com/beautify-web/js-beautify/pull/753))
584
+ * Prevent incorrect wrapping of return statements. ([#751](https://github.com/beautify-web/js-beautify/pull/751))
585
+ * `js-beautify -X` breaks code with jsx spread attributes ([#734](https://github.com/beautify-web/js-beautify/issues/734))
586
+ * Unhelpful error when .jsbeautifyrc has invalid json ([#728](https://github.com/beautify-web/js-beautify/issues/728))
587
+ * Support for ES7 decorators ([#685](https://github.com/beautify-web/js-beautify/issues/685))
588
+ * Don't wrap XML declaration (or processing instructions) ([#683](https://github.com/beautify-web/js-beautify/pull/683))
589
+ * JSX/JS: Single field objects should not expand ([#674](https://github.com/beautify-web/js-beautify/issues/674))
590
+ * ES6 Module Loading Object Destructuring newlines ([#668](https://github.com/beautify-web/js-beautify/issues/668))
591
+ * Beautifying css tears @media in two lines, adds spaces in names with hyphens ([#656](https://github.com/beautify-web/js-beautify/issues/656))
592
+ * ES6 concise method not propely indented ([#647](https://github.com/beautify-web/js-beautify/issues/647))
593
+ * Extra newline inserted with `wrap_attributes` set to "force" ([#641](https://github.com/beautify-web/js-beautify/issues/641))
594
+ * `wrap_attributes` ignores `wrap_attributes_indent_size` and `wrap_line_length` when set to "auto" ([#640](https://github.com/beautify-web/js-beautify/issues/640))
595
+ * Error building on Windows ([#638](https://github.com/beautify-web/js-beautify/issues/638))
596
+ * Mixed shorthand function with arrow function in object literal is mis-formatted ([#602](https://github.com/beautify-web/js-beautify/issues/602))
597
+ * Space does not let save using "&:" ([#594](https://github.com/beautify-web/js-beautify/issues/594))
598
+ * Indenting is broken in some cases ([#578](https://github.com/beautify-web/js-beautify/issues/578))
599
+ * modified cli.js so that it can read from piped input by default ([#558](https://github.com/beautify-web/js-beautify/pull/558))
600
+ * Update release process instructions ([#543](https://github.com/beautify-web/js-beautify/issues/543))
601
+ * Publish v1.6.0 ([#542](https://github.com/beautify-web/js-beautify/issues/542))
602
+ * es6 destructuring ([#511](https://github.com/beautify-web/js-beautify/issues/511))
603
+ * NPM js-beautify: different treatment of "-" in command line ([#390](https://github.com/beautify-web/js-beautify/issues/390))
604
+ * Newline inserted after ES6 module import/export ([#382](https://github.com/beautify-web/js-beautify/issues/382))
605
+ * Option to preserve or inline "short objects" on a single line ([#315](https://github.com/beautify-web/js-beautify/issues/315))
606
+ * Format json in line ([#114](https://github.com/beautify-web/js-beautify/issues/114))
416
607
 
417
608
 
418
609
  ## v1.5.10
@@ -596,53 +787,12 @@ https://github.com/beautify-web/js-beautify/compare/v1.5.1...v1.5.2
596
787
  * Cannot declare object literal properties with unquoted reserved words ([#440](https://github.com/beautify-web/js-beautify/issues/440))
597
788
  * Do not put a space within `function*` generator functions. ([#428](https://github.com/beautify-web/js-beautify/issues/428))
598
789
  * beautification of "nth-child" css fails csslint ([#418](https://github.com/beautify-web/js-beautify/issues/418))
599
-
600
-
601
- ## v1.5.1
602
-
603
- ### Description
604
- Highlights:
605
- * Fixes var declaration of objects and arrays to indent correctly (#256, #430)
606
- * Support keywords as IdentifierNames such as foo.catch() (#309, #351,#368, #378)
607
- * Improved indenting for statements (#289)
608
- * Improved ES6 support - let, const, template strings, and "fat arrow"
609
- * Support for non-ASCII characters in variable names (#305)
610
- * Multiple fixes to requirejs support and added tests to protect in future
611
- * Improved LESS support (still plenty of room for improvement in this area)
612
- * Do not add space after !!
613
-
614
- https://github.com/einars/js-beautify/compare/v1.4.2...v1.5.1
615
-
616
- ### Closed Issues
617
- * Nested if statements not displayed correctly ([#450](https://github.com/beautify-web/js-beautify/issues/450))
618
- * preserve_newlines always true ([#449](https://github.com/beautify-web/js-beautify/issues/449))
619
- * line wrapping breaks in weird places ([#438](https://github.com/beautify-web/js-beautify/issues/438))
620
- * Update dependencies to current versions ([#437](https://github.com/beautify-web/js-beautify/pull/437))
621
- * Add support for ES6 template strings ([#434](https://github.com/beautify-web/js-beautify/pull/434))
622
- * Fix #402: support ES6 fat arrow ([#433](https://github.com/beautify-web/js-beautify/pull/433))
623
- * Ending brace missaligned when part of first definition in var line ([#430](https://github.com/beautify-web/js-beautify/issues/430))
624
- * fixing disabled line wrapping for HTML ([#429](https://github.com/beautify-web/js-beautify/pull/429))
625
- * Missing semi colon ([#420](https://github.com/beautify-web/js-beautify/issues/420))
626
- * Fixed require.js support ([#416](https://github.com/beautify-web/js-beautify/pull/416))
627
- * should not split the es6 operator '=>' ([#402](https://github.com/beautify-web/js-beautify/issues/402))
628
- * fixed relative paths for require.js ([#387](https://github.com/beautify-web/js-beautify/pull/387))
629
- * Support reserved words as property names ([#378](https://github.com/beautify-web/js-beautify/issues/378))
630
- * Make the AMD API match the rest of the APIs ([#376](https://github.com/beautify-web/js-beautify/pull/376))
631
- * Preserve newlines in html related to issue #307 ([#375](https://github.com/beautify-web/js-beautify/pull/375))
632
- * Multi-line statements ([#374](https://github.com/beautify-web/js-beautify/issues/374))
633
- * Reserved words used as property/function/variable identifiers are formatted incorrectly ([#368](https://github.com/beautify-web/js-beautify/issues/368))
634
- * fixed problems with colon character ([#363](https://github.com/beautify-web/js-beautify/pull/363))
635
- * require.JS paths are hardcoded in beautify-html.js ([#359](https://github.com/beautify-web/js-beautify/issues/359))
636
- * Regression in p.a.c.ked file detection ([#357](https://github.com/beautify-web/js-beautify/issues/357))
637
- * Fix Issue #339 ([#354](https://github.com/beautify-web/js-beautify/pull/354))
638
- * Added single line comment support in less/sass for javascript parser ([#353](https://github.com/beautify-web/js-beautify/pull/353))
639
- * Function named 'in' not formatting correctly ([#351](https://github.com/beautify-web/js-beautify/issues/351))
640
- * CSS Pseudo element ([#346](https://github.com/beautify-web/js-beautify/issues/346))
641
- * array closing brace error for return statements with keep_array_indentation ([#340](https://github.com/beautify-web/js-beautify/issues/340))
642
- * CSS Beautifier: breaks :before and :after (regression) ([#339](https://github.com/beautify-web/js-beautify/issues/339))
643
- * Publish v1.5.0 ([#335](https://github.com/beautify-web/js-beautify/issues/335))
644
- * "keep array indentation" not working ([#333](https://github.com/beautify-web/js-beautify/issues/333))
645
- * CSS Beautifier: support LESS/SASS line comments ([#326](https://github.com/beautify-web/js-beautify/issues/326))
646
- * Incorrect formating with semicolon-less code ([#323](https://github.com/beautify-web/js-beautify/issues/323))
790
+ * comment breaks indent ([#413](https://github.com/beautify-web/js-beautify/issues/413))
791
+ * AngularJS inline templates are being corrupted! ([#385](https://github.com/beautify-web/js-beautify/issues/385))
792
+ * Beautify HTML: Setting inline JS and CSS to stay unformatted ([#383](https://github.com/beautify-web/js-beautify/issues/383))
793
+ * Spaces in function definition ([#372](https://github.com/beautify-web/js-beautify/issues/372))
794
+ * Chained code indents break at comment lines ([#314](https://github.com/beautify-web/js-beautify/issues/314))
795
+ * Handling of newlines around if/else/if statements ([#311](https://github.com/beautify-web/js-beautify/issues/311))
796
+ * Tags in javascript are being destroyed ([#117](https://github.com/beautify-web/js-beautify/issues/117))
647
797
 
648
798
 
package/README.md CHANGED
@@ -61,17 +61,17 @@ JS Beautifier is hosted on two CDN services: [cdnjs](https://cdnjs.com/libraries
61
61
 
62
62
  To pull the latest version from one of these services include one set of the script tags below in your document:
63
63
  ```html
64
- <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.9.0-beta4/beautify.js"></script>
65
- <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.9.0-beta4/beautify-css.js"></script>
66
- <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.9.0-beta4/beautify-html.js"></script>
64
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.10.0/beautify.js"></script>
65
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.10.0/beautify-css.js"></script>
66
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.10.0/beautify-html.js"></script>
67
67
 
68
- <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.9.0-beta4/beautify.min.js"></script>
69
- <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.9.0-beta4/beautify-css.min.js"></script>
70
- <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.9.0-beta4/beautify-html.min.js"></script>
68
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.10.0/beautify.min.js"></script>
69
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.10.0/beautify-css.min.js"></script>
70
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.10.0/beautify-html.min.js"></script>
71
71
 
72
- <script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.9.0-beta4/js/lib/beautify.js"></script>
73
- <script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.9.0-beta4/js/lib/beautify-css.js"></script>
74
- <script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.9.0-beta4/js/lib/beautify-html.js"></script>
72
+ <script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.10.0/js/lib/beautify.js"></script>
73
+ <script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.10.0/js/lib/beautify-css.js"></script>
74
+ <script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.10.0/js/lib/beautify-html.js"></script>
75
75
  ```
76
76
 
77
77
  Older versions are available by changing the version number.
@@ -190,6 +190,8 @@ Beautifier Options:
190
190
  --good-stuff Warm the cockles of Crockford's heart
191
191
  -C, --comma-first Put commas at the beginning of new line instead of end
192
192
  -O, --operator-position Set operator position (before-newline|after-newline|preserve-newline) [before-newline]
193
+ --indent-empty-lines Keep indentation on empty lines
194
+ --templating List of templating languages (auto,django,erb,handlebars,php) ["auto"] auto = none in JavaScript, all in html
193
195
  ```
194
196
 
195
197
  Which correspond to the underscored option keys for both library interfaces
@@ -219,7 +221,9 @@ Which correspond to the underscored option keys for both library interfaces
219
221
  "wrap_line_length": 0,
220
222
  "e4x": false,
221
223
  "comma_first": false,
222
- "operator_position": "before-newline"
224
+ "operator_position": "before-newline",
225
+ "indent_empty_lines": false,
226
+ "templating": ["auto"]
223
227
  }
224
228
  ```
225
229
 
@@ -316,6 +320,7 @@ CSS Beautifier Options:
316
320
  -n, --end-with-newline End output with newline
317
321
  -L, --selector-separator-newline Add a newline between multiple selectors
318
322
  -N, --newline-between-rules Add a newline between CSS rules
323
+ --indent-empty-lines Keep indentation on empty lines
319
324
 
320
325
  HTML Beautifier Options:
321
326
  -s, --indent-size Indentation size [4]
@@ -338,16 +343,38 @@ HTML Beautifier Options:
338
343
  --editorconfig Use EditorConfig to set up the options
339
344
  --indent_scripts Sets indent level inside script tags ("normal", "keep", "separate")
340
345
  --unformatted_content_delimiter Keep text content together between this string [""]
346
+ --indent-empty-lines Keep indentation on empty lines
347
+ --templating List of templating languages (auto,none,django,erb,handlebars,php) ["auto"] auto = none in JavaScript, all in html
341
348
  ```
342
349
 
343
- ## Directives to Ignore or Preserve sections (Javascript beautifier only)
350
+ ## Directives
344
351
 
345
- Beautifier for supports directives in comments inside the file.
346
- This allows you to tell the beautifier to preserve the formatting of or completely ignore part of a file.
347
- The example input below will remain changed after beautification
352
+ Directives let you control the behavior of the Beautifier from within your source files. Directives are placed in comments inside the file. Directives are in the format `/* beautify {name}:{value} */` in CSS and JavaScript. In HTML they are formatted as `<!-- beautify {name}:{value} -->`.
353
+
354
+ ### Ignore directive
355
+
356
+ The `ignore` directive makes the beautifier completely ignore part of a file, treating it as literal text that is not parsed.
357
+ The input below will remain unchanged after beautification:
358
+
359
+ ```js
360
+ // Use ignore when the content is not parsable in the current language, JavaScript in this case.
361
+ var a = 1;
362
+ /* beautify ignore:start */
363
+ {This is some strange{template language{using open-braces?
364
+ /* beautify ignore:end */
365
+ ```
366
+
367
+ ### Preserve directive
368
+
369
+ NOTE: this directive only works in HTML and JavaScript, not CSS.
370
+
371
+ The `preserve` directive makes the Beautifier parse and then keep the existing formatting of a section of code.
372
+
373
+ The input below will remain unchanged after beautification:
348
374
 
349
375
  ```js
350
- // Use preserve when the content is not javascript, but you don't want it reformatted.
376
+ // Use preserve when the content is valid syntax in the current language, JavaScript in this case.
377
+ // This will parse the code and preserve the existing formatting.
351
378
  /* beautify preserve:start */
352
379
  {
353
380
  browserName: 'internet explorer',
@@ -355,12 +382,6 @@ The example input below will remain changed after beautification
355
382
  version: '8'
356
383
  }
357
384
  /* beautify preserve:end */
358
-
359
- // Use ignore when the content is not parsable as javascript.
360
- var a = 1;
361
- /* beautify ignore:start */
362
- {This is some strange{template language{using open-braces?
363
- /* beautify ignore:end */
364
385
  ```
365
386
 
366
387
  # License
@@ -378,4 +399,4 @@ Thanks also to Jason Diamond, Patrick Hof, Nochum Sossonko, Andreas Schneider, D
378
399
  Vasilevsky, Vital Batmanov, Ron Baldwin, Gabriel Harrison, Chris J. Shull,
379
400
  Mathias Bynens, Vittorio Gambaletta and others.
380
401
 
381
- (README.md: js-beautify@1.9.0-beta4)
402
+ (README.md: js-beautify@1.10.0)