Commit Graph

933 Commits

Author SHA1 Message Date
Diego Zilioti
bfdea6ee6b Add unit tests for core options 2018-10-05 01:22:51 -03:00
L. D. MacKrell
096a070ab3 Add tests for indent scripts option
*Add indent_scripts to README
2018-09-27 15:01:08 -07:00
Liam Newman
74009348f2
Merge branch 'master' into add-tests 2018-09-27 13:15:25 -07:00
Liam Newman
c748b9597a Change shebang tokenizing to use inputscanner.read
The point of inputscanner is to avoid having the tokenizer
looping over input and use patterns instead.

This commit switches tokenizing of shebangs to from looping to pattern reading.
2018-09-27 12:32:49 -07:00
Liam Newman
ab7c9f9c51 Fixed alternate newline handling
The previous implmentation only handle slash-n.
Added tests with more inputs revealed issues with slash-rn.
Fixed up regex to handle them.
2018-09-27 12:13:32 -07:00
L. D. MacKrell
52ce863275 Update inputscanner tests
* fixed js tests
* wrote python equivalent tests
* found and fixed bug in inputscanner.py for test_Char
2018-09-27 12:04:36 -07:00
MacKLess
1e99b57827
Merge branch 'master' into add-tests 2018-09-27 09:32:29 -07:00
L. D. MacKrell
b32ef2d705 Fix extendscript #include 2018-09-26 17:36:26 -07:00
L. D. MacKrell
fe0006ae0f Fix dynamic import arrow support 2018-09-26 16:46:26 -07:00
L. D. MacKrell
cd49403caf Add option for space before named function 2018-09-26 15:32:51 -07:00
L. D. MacKrell
677b0dc762 Fix formatting for Typescript declare 2018-09-10 14:39:51 -07:00
Liam Newman
6469217c8d
Merge branch 'master' into io-move 2018-09-10 12:54:00 -07:00
Liam Newman
5aec460246
Merge pull request #1540 from bitwiseman/uri
Fixed support for data URI with test
2018-09-10 12:53:43 -07:00
Liam Newman
ee99c9b829
Merge branch 'master' into io-move 2018-09-10 12:53:17 -07:00
Liam Newman
2d48af82f3 Move all references to beautifier.io 2018-09-09 13:57:13 -07:00
Liam Newman
aadec2b867 Preserve new line at start of handlebars contents
Fixes #1469
2018-09-08 17:01:56 -07:00
Liam Newman
ac6450f425 Fixed support for data URI with test
Fixes #1535
2018-09-08 13:37:05 -07:00
Liam Newman
0ef7b81973 Fix for unformatted and content_unformatted
Fixes #1534
2018-09-04 14:56:01 -07:00
Liam Newman
886f6d315c Fixed unindent chained methods under-indent 2018-09-04 13:24:56 -07:00
L. D. MacKrell
b5ef9b4727 Refactor _flags.last_text to _flags.last_token.text 2018-09-02 19:21:12 -07:00
L. D. MacKrell
e849cb905c Refactor TOKEN.RESERVED to reserved_word and reserved_array functions 2018-09-02 16:46:20 -07:00
Liam Newman
418fc7a6b9 Refactor end_with_newline in Output settings 2018-09-01 14:42:41 -07:00
Liam Newman
a46d717eb3 Refactor indent_string calculation into Output 2018-09-01 14:35:46 -07:00
Liam Newman
02d89694af Added single selection options 2018-09-01 14:08:00 -07:00
Liam Newman
f46c4f341e
Merge branch 'master' into level 2018-08-31 18:39:40 -07:00
L. D. MacKrell
79717afda4 Add level options functionality with tests 2018-08-31 18:26:00 -07:00
L. D. MacKrell
8bc8d4355a Update unindent method for each else blocks 2018-08-31 14:07:55 -07:00
Liam Newman
75f38d907d Fixed await indenting
Fixes #1519
Fixes #1517
2018-08-30 13:22:47 -07:00
Liam Newman
e333ae52de Fix css perf tests 2018-08-30 13:21:46 -07:00
Liam Newman
4807865f02 Run more perf tests and on larger files 2018-08-28 23:44:08 -07:00
Liam Newman
698dd05fc2 Move acorn to javascript module 2018-08-28 14:55:55 -07:00
Liam Newman
4383295024 Cleanup 2018-08-28 14:55:55 -07:00
Liam Newman
486da48247 indent_inner_html defaults to false 2018-08-28 14:55:55 -07:00
Liam Newman
fb36163332 Move css beautifier to prototype 2018-08-28 14:55:55 -07:00
Liam Newman
81d3177bff Add core Options class 2018-08-28 14:55:54 -07:00
Liam Newman
d210b6381e Refactor js beautifier 2018-08-28 14:31:01 -07:00
Liam Newman
cca8bcae81 Fix indent_inner_html
Fixes #1514
2018-08-27 14:54:47 -07:00
Liam Newman
f225157557 Re-add test 2018-08-27 14:54:47 -07:00
Liam Newman
498a5504e6
Merge pull request #1513 from MacKLess/hbs
Add test for handlebars with wrap attributes
2018-08-25 16:45:29 -07:00
L. D. MacKrell
2fd78a68e6 Add test for handlebars with wrap attributes 2018-08-25 16:34:01 -07:00
Liam Newman
f6e38be762
Merge pull request #1512 from MacKLess/svg
Add test for SVG formatting
2018-08-25 16:05:18 -07:00
L. D. MacKrell
8d6bf68ee8 Add test for SVG formatting 2018-08-25 15:56:46 -07:00
Liam Newman
d9b36ad054
Merge pull request #1511 from MacKLess/media
Add test for newlines in css @media blocks
2018-08-25 15:45:47 -07:00
L. D. MacKrell
9bedbe1dc8 Add test for newlines in css @media blocks 2018-08-25 15:40:12 -07:00
L. D. MacKrell
e3979f51fd Add test for wrapping negative expressions that end a line 2018-08-25 15:12:23 -07:00
Liam Newman
a1bfc0589d Add CLI values 2018-08-24 13:33:19 -07:00
Liam Newman
47231ba0ee Add tests 2018-08-24 13:33:19 -07:00
Liam Newman
f97b8f8f90
Merge pull request #1509 from MacKLess/test
Add test for expressions inside handlebars
2018-08-24 01:06:08 -07:00
L. D. MacKrell
be723b152e Add test for expressions inside handlebars 2018-08-24 00:49:44 -07:00
L. D. MacKrell
5ea52424e4 Add test for wrap attributes force aligned 2018-08-24 00:40:24 -07:00
Liam Newman
e01e0db993 Tests for closed issues
Closes #645
Closes #1122
2018-08-23 22:40:51 -07:00
Liam Newman
fe3f3a7bcc Test for dl-dt-dd optional tags 2018-08-23 20:48:41 -07:00
Liam Newman
d2e8f40f2c Roll back strict on CLI just in case 2018-08-23 18:11:54 -07:00
Liam Newman
d710e25b93
Merge pull request #1505 from MacKLess/handlebars
Add test for formatting handlebars with nbsp
2018-08-23 15:07:14 -07:00
Liam Newman
ac8e54c763
Merge pull request #1504 from MacKLess/ASPX
Add test for ASPX JSP directives formatting
2018-08-23 14:11:25 -07:00
L. D. MacKrell
de179ce5f7 Add test for formatting handlebars with nbsp 2018-08-23 14:11:10 -07:00
L. D. MacKrell
62e0536721 Add test for ASPX JSP directives formatting 2018-08-23 13:50:54 -07:00
L. D. MacKrell
ecc7ec80ec Update optional closing tag indent formatting 2018-08-23 13:29:21 -07:00
Liam Newman
4278f10b7f Refactor tag stack 2018-08-23 11:44:10 -07:00
L. D. MacKrell
34700233fc Modify html5 space characters 2018-08-22 23:49:02 -07:00
Liam Newman
14849d6085 Tests for #1496 2018-08-22 18:23:15 -07:00
Liam Newman
ca26d5af2b
Merge branch 'master' into space 2018-08-22 16:55:10 -07:00
Liam Newman
5362878ef5 Turn on use strict across most of project
Stop sloppy humans from doing sloppy human things.
2018-08-22 16:51:25 -07:00
Liam Newman
8f322b4be9 Closes #869 2018-08-22 15:58:13 -07:00
Liam Newman
554005310e
Merge pull request #1494 from MacKLess/button
Add test for html formatting after button element
2018-08-22 13:14:28 -07:00
Liam Newman
63bf73d300
Merge branch 'master' into button 2018-08-22 13:02:49 -07:00
L. D. MacKrell
ae772fab46 Fixed whitespace detection issue with tests 2018-08-22 12:56:38 -07:00
L. D. MacKrell
85a8fe3e73 Converts name dashes to underscore in option inputs 2018-08-22 11:52:44 -07:00
L. D. MacKrell
fb9a7b1867 Add test for html formatting following button 2018-08-22 00:59:51 -07:00
Liam Newman
c2da393fe5 Add support for optional html tags 2018-08-21 21:59:05 -07:00
Liam Newman
7c2eda572b HTML refactoring 2018-08-21 18:50:40 -07:00
Liam Newman
26ec3a76f2 Correctly handle void_elements
Fixes #1475
2018-08-21 16:24:13 -07:00
Liam Newman
0aac315ab6 Add disabled option to pass through source unchanged
Closes #1405
2018-08-20 15:32:37 -07:00
Liam Newman
0405dea61a Test for #1491 2018-08-20 12:08:16 -07:00
Liam Newman
ddf7aafad5 Reorganize HTML Beautifier 2018-08-20 12:08:16 -07:00
Liam Newman
bb9e17785c More clean up 2018-08-16 22:57:41 -07:00
Liam Newman
2a4bc0954a Improved fixed from nested newline between rules
Fixes #1406
2018-08-16 21:12:31 -07:00
Liam Newman
6b812daf22 General tightening of member access limits 2018-08-16 14:00:05 -07:00
Liam Newman
62cc382ac9 Create IndentCache to encapsulate indent and align 2018-08-16 12:45:21 -07:00
L. D. MacKrell
010d5bc5dc Force newline in between rules in CSS block 2018-08-15 16:44:39 -07:00
L. D. MacKrell
d7129bb8e8 Force newlines between nested rules in SCSS 2018-08-15 10:30:42 -07:00
Liam Newman
985a2b4c1f Centralize indent string creation 2018-08-14 15:01:50 -07:00
Liam Newman
8fbbe7c012 Continuing churn of html beautifier 2018-08-14 14:14:12 -07:00
Liam Newman
56de0e61cf HTML Output cleanup 2018-08-14 12:25:54 -07:00
Liam Newman
c1b9ae6917 Remove innner loop of attribute processing 2018-08-13 22:22:09 -07:00
Liam Newman
af6a557137 Make most html tests not fragments 2018-08-13 18:08:52 -07:00
L. D. MacKrell
a59c88762f Adds test to preserve newlines 2018-08-13 15:54:53 -07:00
L. D. MacKrell
7d2e0baaf0 Support @import in CSS 2018-08-13 14:54:06 -07:00
L. D. MacKrell
1ade0cfdf0 Preserve newline in block css property values 2018-08-13 13:26:54 -07:00
Liam Newman
9b3577c45d Handle attributes with spaces
Fixes #1094
2018-08-13 10:33:19 -07:00
Liam Newman
7f5a6920f9 Add more tests 2018-08-12 22:48:43 -07:00
Liam Newman
f37cb1c86e Add more tests 2018-08-12 22:45:17 -07:00
Liam Newman
6a043f007c Hotfixes for issues in rc5
Fixes #1481
Fixes #1482
Fixes #1483
2018-08-12 22:36:37 -07:00
Liam Newman
c4f03cce7e Add test for html ignore directive
Closes #545
Closes #994
2018-08-11 21:58:00 -07:00
Liam Newman
6e8afc8406 Add alignment to output 2018-08-11 21:58:00 -07:00
Liam Newman
6b4ab06034 Html beautifier uses only one output stream 2018-08-11 21:58:00 -07:00
Liam Newman
89e91a8242 Add more navgation to token 2018-08-11 21:58:00 -07:00
Liam Newman
9a53aba300 Handlebars unless and else if
Fixed #800
Fixes #1123
2018-08-11 18:38:47 -07:00
Liam Newman
59b416666f Remove extra code 2018-08-11 18:08:48 -07:00
Liam Newman
cc76cc6e82 Fixes for line wrap in Html
Closes #607
Closes #1304
Closes #1383
Fixes #1401
2018-08-11 17:59:19 -07:00
Liam Newman
ab4d2f02e4 Improve test output for failures 2018-08-11 15:53:03 -07:00
Liam Newman
77d1460e5f Improved reporting 2018-08-11 15:32:58 -07:00
Liam Newman
b760fc828f Add tokenizer to html beautifier 2018-08-10 22:56:35 -07:00
L. D. MacKrell
7eb4e3b29b Test for spacing around attribute value selector 2018-08-09 17:16:09 -07:00
Liam Newman
91673fe65e
Merge branch 'master' into add-tests 2018-08-09 09:13:11 -07:00
Liam Newman
33e8195e79 Code format changes 2018-08-07 02:01:47 -07:00
Liam Newman
d2b4e272c4 Use read for recent change 2018-08-06 15:29:47 -07:00
Liam Newman
acd0086be3 Move javascript core classes to prototype
Results in 50% performance improvment.
2018-08-06 15:25:32 -07:00
Liam Newman
4e971ee215 Use javascript inheritance for tokenizer 2018-08-06 15:25:32 -07:00
Liam Newman
6298ddbfc0 Remove duplicate readUntilAfter code 2018-08-06 15:25:32 -07:00
Liam Newman
dc00c56e60 Use regexp for reserved words 2018-08-06 15:25:32 -07:00
Liam Newman
00e5407b85 Reorganize tokenizer 2018-08-06 15:25:32 -07:00
Liam Newman
28e86b9af8 TokenStream in Python 2018-08-06 15:25:32 -07:00
Liam Newman
a69766418a Core.Tokenizer in Python 2018-08-06 15:25:32 -07:00
Liam Newman
acbf7d609d Remove extra fields from Token 2018-08-06 15:25:32 -07:00
Liam Newman
9218d39c65 Change readWhile to read 2018-08-06 15:25:32 -07:00
Liam Newman
c3f7fe75ea Directives in python 2018-08-06 15:25:32 -07:00
Liam Newman
a235009c97 TokenStream 2018-08-06 15:25:32 -07:00
Liam Newman
dbbaa509ea TokenFactory 2018-08-06 15:25:32 -07:00
Liam Newman
bbb86b44f0 Add related classes 2018-08-06 15:25:32 -07:00
Liam Newman
2e9a299851 Inherit tokenizer from core 2018-08-06 15:25:32 -07:00
Liam Newman
b64d9dd6cd Tweak test description 2018-08-06 14:44:28 -07:00
Liam Newman
c2d1b16c1a
Merge branch 'master' into closing_tags 2018-08-06 14:06:38 -07:00
L. D. MacKrell
d751e0c46e Update closing tags to handle no space 2018-08-06 13:50:34 -07:00
Liam Newman
0494243223
Merge branch 'master' into tagtest 2018-08-06 13:10:16 -07:00
L. D. MacKrell
b50ded1227 Add test for p tag formatting issue resolved in prior version 2018-08-06 11:07:40 -07:00
Liam Newman
e07bb17288
Merge branch 'master' into add-tests 2018-08-06 11:07:13 -07:00
ganesh
d2eebf323d Add unit tests for input scanner 2018-08-05 22:31:59 +05:30
Liam Newman
ca327927c1 Add polyfill to web page to support older browsers 2018-08-03 20:14:33 -07:00
L. D. MacKrell
064e7f3121 Add test for else if in handlebars 2018-08-02 23:39:56 -07:00
L. D. MacKrell
57c81047af Add test for Handlebars indenting issue 2018-08-02 23:02:27 -07:00
L. D. MacKrell
18225c5de2 Ensure space between adjacent words in js 2018-08-01 15:39:44 -07:00
Liam Newman
1e5ff53df5 Additional minor tweaks 2018-08-01 12:43:47 -07:00
Liam Newman
2e6972bbc1 Avoid joining content twice for most elements 2018-07-31 21:19:00 -07:00
Liam Newman
e3f01c58c0 Simpler and faster unformatted processing
get_unformatted is heavily used - in particular for string reading.
This change results in perf improvement of 20% in most cases,
up to 3000% in the base64 image edge case.
2018-07-31 21:11:20 -07:00
Liam Newman
93c5efdd0c Do not lowercase elements
Fixes #1464
2018-07-31 21:01:37 -07:00
Liam Newman
cfe797f6e4 Regression test for #1461 2018-07-31 11:04:09 -07:00
Liam Newman
2b0d6e8e86 Fix adding spaces and indents to handlebars
Fixes #1460
2018-07-26 16:02:45 -07:00
Liam Newman
d75357aa31 More cleanup 2018-07-26 14:46:48 -07:00
Liam Newman
bd1610fad9 Refactor number recognition to regex 2018-07-26 11:14:32 -07:00
Liam Newman
bdb82fb80d Add TOKEN object 2018-07-25 23:28:13 -07:00
Liam Newman
4556d25f67
Merge pull request #1455 from vivainio/master
Use entry_points to create script. Fix #1266 (script not working on Windows)
2018-07-25 22:56:25 -07:00
Liam Newman
e1a6de6385 Reorganizing build pipeline 2018-07-25 22:40:25 -07:00
L. D. MacKrell
3993da255a Update comment on spidermonkey sharp in tokenizer 2018-07-25 13:19:45 -07:00
L. D. MacKrell
05e10caa9b Fix LESS variable formatting 2018-07-25 11:55:01 -07:00
Liam Newman
2fc2daf483 Add node packaging and tests
Fixed #1254
2018-07-25 07:05:21 -07:00
L. D. MacKrell
ad7841ee19 Update handle operator to preserve newline before unary 2018-07-23 15:02:08 -07:00
L. D. MacKrell
d8a2b21ef8 Make output debuggable 2018-07-23 13:20:30 -07:00
Liam Newman
008721a9ed Remove html beautifier peekString 2018-07-20 11:54:26 -07:00
Liam Newman
1f15cb81fc Clean up content reading 2018-07-20 00:41:09 -07:00
Liam Newman
75a6f153ca Move Html beautifier to InputScanner 2018-07-18 21:50:09 -07:00
Liam Newman
5f44759790 CSS Beautifier using InputScanner 2018-07-18 14:01:21 -07:00
Liam Newman
1eae819f77 Remove PeekCharCode 2018-07-16 23:40:30 -07:00
Liam Newman
c34633b73e Add readWhile for matching 2018-07-16 12:46:07 -07:00
Liam Newman
8362eb3402 CommonJS loads from src 2018-07-12 15:28:06 -07:00
Liam Newman
869739069a Apply jshint to more files 2018-07-10 17:19:20 -07:00
Liam Newman
54f8e464b4 Add first unit test for input scanner 2018-07-10 00:15:54 -07:00
Liam Newman
2fe86d18ad Add mocha for unit testing 2018-07-10 00:15:24 -07:00
L. D. MacKrell
fc231b101b Refactor beautifier startStatement function 2018-07-09 11:10:07 -07:00
L. D. MacKrell
c0d6989d7a Fix inputscanner 2018-07-09 11:07:53 -07:00
L. D. MacKrell
91ffb9babd Update copyright dates 2018-07-09 10:42:23 -07:00
L. D. MacKrell
94a8231c1f Refactor Options with comments 2018-07-09 10:39:20 -07:00
L. D. MacKrell
7548943100 Refactor inputscanner with comments 2018-07-09 10:31:10 -07:00
Liam Newman
054cf55dcd Fix hanging run 2018-07-08 20:39:32 -07:00
Liam Newman
f8c1d47da8 Fix up merge issues 2018-07-08 18:48:19 -07:00
L. D. MacKrell
a63c5c6cc1 Fix xml detection and test 2018-07-08 18:48:19 -07:00
Liam Newman
a135077fcd Apply beautifier to more project code 2018-07-06 20:29:17 -07:00
Liam Newman
c8ff7d47a6 Build fixes 2018-07-06 19:14:50 -07:00
Liam Newman
6abc46d50d Test for comment position
Closes #1440
2018-07-06 15:57:09 -07:00
Liam Newman
325d9371be Switch to 2 space indents 2018-07-06 15:54:51 -07:00
Liam Newman
f535610cc5 Update build and tools 2018-07-06 15:52:16 -07:00
Liam Newman
504d0450d5 Merge remote-tracking branch 'beautify-web/master' into lib-cleanup 2018-07-06 15:50:28 -07:00
Liam Newman
f63714a1ef Build clean up 2018-07-05 13:26:26 -07:00
Liam Newman
3ac947ec9d Remove lib from git history 2018-07-05 12:44:04 -07:00
L. D. MacKrell
f491716330 Keeps inline comments with closing tag 2018-07-02 15:55:54 -07:00
Liam Newman
6c6fa835c9 Test for increment indent
Fixed #814
2018-06-30 15:46:22 -07:00
Liam Newman
8df34ded0f Another line wrap test
Fixed #1223
2018-06-30 15:16:40 -07:00
Liam Newman
7f0cfda40f Await import() support
Fixed #1228
2018-06-30 14:18:56 -07:00
Liam Newman
42a9c697b7
Merge branch 'master' into wrap-test 2018-06-30 13:05:42 -07:00
Liam Newman
07d746b57c More test for fixed issues
Fixes #882
Fixes #1041
Fixes #1167
Fixes #1184
2018-06-30 13:04:50 -07:00
Liam Newman
48539e2a20 Add line wrap test 2018-06-30 11:34:51 -07:00
Liam Newman
371adf465c
Merge pull request #1297 from cheerypick/master
Add 'aligned' option that align attributes after specific line length…
2018-06-30 10:58:08 -07:00
Liam Newman
82039ac0f0 Changed name to aligned-multiple 2018-06-30 10:51:18 -07:00
Ekaterina
b894ba305d Add 'aligned' option that align attributes after specific line length if wrap line length is set 2018-06-30 10:51:18 -07:00
L. D. MacKrell
b2b7517aeb Fixes :hover for @extend issue 2018-06-30 09:49:27 -07:00
Liam Newman
0963c1464e Update dependencies 2018-06-29 21:09:06 -07:00
Liam Newman
bdb9837076 Minor additional tweaks 2018-06-29 20:45:02 -07:00
Liam Newman
b6b84720d7 Removing complex is_unformatted check 2018-06-29 20:16:52 -07:00
Liam Newman
8b85d77fa9 Cleaned up inline to not need more regex 2018-06-29 19:47:55 -07:00
Liam Newman
aeba0027a0
Merge branch 'master' into format-inline-tags 2018-06-29 16:27:11 -07:00
Liam Newman
43fac5caa3
Merge branch 'master' into 1283-Javascript++OperatorGetsWrongIndentation 2018-06-28 20:23:49 -07:00
L. D. MacKrell
3be5928c6d Fixed incorrect unindent for if else blocks
Fixes #1378
2018-06-28 14:29:16 -07:00
madman-bob
def3cbda79 Add unformatted HTML element tests 2018-06-16 10:27:21 +01:00
madman-bob
49ed021bdd Add inline element tests 2018-06-08 14:17:47 +01:00
madman-bob
683a3ac785 Uncomment previously broken test 2018-06-08 14:17:47 +01:00
madman-bob
0e9ad61dba Add concept of inline HTML tags 2018-06-08 14:16:50 +01:00
madman-bob
468f79a193 Clarify content_unformatted tests
By comparison with textarea, note that <textarea><textarea></textarea></textarea>
is not balanced, as there is actually only one opening tag.
The second is raw text inside the text area.
2018-06-01 11:10:32 +01:00
Elrendio
d16b21ae47 1283 - Javascript ++ Operator Gets Wrong Indentation
Resolves #1283

**What was done:**
 - Adapted function print_newline to restore mode if last_test was operator ++ or --
 - Added corresponding test.

**Example of behavior:**
== Input ==
{this.foo++
bar}

== Expexted Output ==
{
    this.foo++
    bar
}

== Unchanged ==
axios.interceptors.request.use(
    config => {
        // loading
        window.store.loading++
        let extraParams = {}
    }
)
2018-05-25 10:45:45 +02:00
Liam Newman
56a6270bc0 Handle null input strings
Fixes #1120
2018-05-21 15:20:10 -07:00
andreyvolokitin
35dc66afa3 Reset line length count only when actually wrapping 2018-05-11 16:55:50 -07:00
Liam Newman
6ed2116c4c
Merge pull request #1303 from thejoshwolfe/bigint
Add support for BigInt literals in JavaScript
2018-05-11 16:29:34 -07:00
Liam Newman
eaeab28757 Add tests for BigInt 2018-05-11 16:19:27 -07:00
Liam Newman
5329720021 Support dynamic import
Fixes #1393
2018-05-11 16:03:25 -07:00
Liam Newman
01111faed5 Rearrange expression start formatting code 2018-05-11 15:28:45 -07:00
Liam Newman
35e2a550d4 Add tests and tweaks for newline rules and comments
Fixes #531
Fixes #857
2018-05-09 14:15:42 -07:00
Liam Newman
2c514e3daf Remove WSEat tracking 2018-05-08 23:10:26 -07:00
Liam Newman
4b1748190d Add newline preservation after inline comments 2018-05-08 22:43:27 -07:00
Liam Newman
66383d7938 Added some newline tests 2018-05-07 18:56:25 -07:00
Liam Newman
aa1b498e43
Merge branch 'master' into bigint 2018-03-22 13:53:11 -07:00
Liam Newman
cfafd3dff1
Merge branch 'master' into master 2018-03-22 13:52:42 -07:00
Liam Newman
472bf83a97 Added #1156 to python implementation 2018-03-15 11:10:09 -07:00
Yu Luo
2274c7804f add tests for less mixins. see pr:1359
Change-Id: Ibf054a8aa345e1d7f30691e19246d8bcab0a12a0
2018-03-15 12:17:35 +08:00
Yu Luo
d74c157e13 issue-1156:fixed line break in mixins after background url
Change-Id: I91fa77493eafb9de820eba802529dcf84ddd0170
2018-03-12 17:57:21 +08:00
Liam Newman
a475e310f9
Merge branch 'master' into master 2018-03-01 16:09:42 -08:00
Liam Newman
ab9e662e60
Merge branch 'master' into bigint 2018-03-01 16:04:06 -08:00
Liam Newman
5b140effb8 Use Regex for tag whitespace detection 2018-03-01 14:36:54 -08:00
Sergio Vallejo
fcb6085fdc Fix multiline tags with line break before whitespace 2018-02-18 18:34:17 -03:00
Sergio Vallejo
6fc32ad105 Prevent indent after PHP echo tag (<?= ... ?> 2018-02-13 17:35:09 -03:00
Liam Newman
8faeb1d107 Prevent exception during anchor tag
Fixes #1202
2018-01-22 16:59:55 -08:00
Josh Wolfe
7226f3dd50 tokenize js bigint literals 2017-12-13 12:53:50 -07:00
amandabot
ffd503c23a Maintain comment positions with all configs
Ensures comments are followed by a new line even when preserve_newlines is off
2017-11-28 21:15:06 -05:00
amandabot
ef25a59bdf Ensure comments maintain position
Block comments above rule sections will no longer add a newline below.
Single line comments below a property will not jump to the same line as the property.
2017-11-19 00:04:46 -05:00
Liam Newman
f6ffd38cf4
Merge branch 'master' into whitespace-important 2017-11-08 21:05:11 -05:00
Tremayne Christ
7a008ced14 Fix to use correct variable name. js_source_text > source_text
Fixes #1286
2017-11-08 17:57:19 -08:00
Liam Newman
a4d7bc63fa Improve invalid option output 2017-11-08 17:56:04 -08:00
sandrosc
c662b5aa0e new test for preserve new lines 2017-10-26 13:44:56 +02:00
Liam Newman
49aa620cc6 Merge branch 'master' into whitespace-important 2017-10-22 18:11:46 -04:00
Jan Pilzer
02dc32118f Whitespace before '!important', fixes #1273 2017-10-18 14:48:55 -07:00
Peter "Coburn" Fornari
40d95bd5e2 Fixed git post status error 2017-10-17 19:24:46 -04:00
Peter "Coburn" Fornari
b2f9048a25 Should fix python smoke test file 2017-10-17 19:24:27 -04:00
Peter "Coburn" Fornari
e92baff8ac Added invalidHandler to nopt 2017-10-17 19:24:23 -04:00
Peter "Coburn" Fornari
a661fe6538 Made brace_style option more inclusive
* Per specifications at end of #1058, takes multiple parameters using the last one
* Still rejects invalid parameters and rewrites compatible ones
2017-10-17 19:23:13 -04:00
Cem Staveley
72f7701ce2 Additional test cases for whitespace between async and arrow fn 2017-09-29 12:07:07 +01:00
Cem Staveley
af25a84b1b include generated files 2017-09-28 00:24:11 +01:00
Cem Staveley
1b450b481d Insert whitespace between async and arrow function 2017-09-28 00:10:57 +01:00
nabijaczleweli
5921cccf12 Fix "that its" to "whose"
I mean, "whose" *sounds* like it's the intended verbiage, but I dunno,
not a linguist
2017-09-26 13:51:13 -04:00
Liam Newman
453bdc93f8 Fixed yield function spacing
Fixes #1206
2017-09-08 17:23:43 -07:00
Liam Newman
f56a513122 Remove Object.value polyfill
Fixes #1205
2017-09-08 10:47:13 -07:00
aecepoglu
258a36177b adding the generated files 2017-09-06 15:31:37 +03:00
aecepoglu
2683c35c8b updated the js src file 2017-09-06 15:27:15 +03:00
aecepoglu
92f3639da4 Merge branch 'master' into unindent-chains-2 2017-09-06 14:40:53 +03:00
aecepoglu
c5350f987e undindent-chained-methods option. Resolves #482 2017-09-06 13:47:33 +03:00
Liam Newman
2009d25091 Move to Webpack and independent modules 2017-05-11 23:04:45 -07:00
Roy Riojas
3cbed749eb Add option void_elements for html
Adds an option that can be used to specify which elements
should be considered void elements as explained here:
http://w3c.github.io/html/syntax.html#void-elements
2017-05-05 13:34:50 -07:00
Liam Newman
0811a2c733 Merge branch 'master' into master 2017-03-18 22:13:44 -07:00
HookyQR
977b47dd0b (re)add preserve_newlines for css (#1146)
* Fix preserve_newlines issue (rebased)

* Fix formatting

* Remove output hack for preserve_newlines
2017-03-18 21:58:24 -07:00
Joshua Haines
ba3221c7fa fix previous test fragement -> fragment and place an object opening tag in the right spot 2017-03-16 15:09:28 +10:00
Joshua Haines
95da55112d add a span attribute wrapping test, too 2017-03-16 14:52:13 +10:00
Joshua Haines
0d3d6daaef add more unformatted and line wrapping attribute tests 2017-03-16 14:41:09 +10:00
Joshua Haines
d1310ab929 add test to ensure that unformatted tags do not have spaces put between them 2017-03-14 10:09:51 +10:00