Commit Graph

962 Commits

Author SHA1 Message Date
zalsaedy
e8c5bdf175 Fixed #1988 and added unit tests 2022-04-11 15:55:12 -04:00
Hammad
027026093e #1622 - Adds space_after_named_function option for ES6 classes 2022-04-11 03:33:56 -02:30
Liam Newman
5ca6beed8a
Merge branch 'main' into remove_whitespace_number 2022-04-09 08:56:24 -07:00
Hammad
9981a93e25 Adding basic support for SCSS/SASS maps 2022-04-08 01:16:16 -02:30
Liam Newman
a5995d0b5d
Merge branch 'main' into in-class-method 2022-04-06 23:24:29 -07:00
Liam Newman
fe57c7bd3a
Merge branch 'main' into bug/css-grid-template-property-fix 2022-04-06 23:23:20 -07:00
Hammad
69789d1ae9 Fix issue #1817 - css property values that have multiple parts and if followed by a string lose formatting. Also add multiline support for grid-template property 2022-04-07 02:52:34 -02:30
Hammad
784bd1e82d Fixing issues with spacing when an object literal lives inside a mixin call 2022-04-06 22:31:51 -02:30
Hammad
f0740309dd Identifying block statements from object literals for objects that have class/interface as key type. Also added some regression tests 2022-04-05 21:34:47 -02:30
Hammad
6ed8dc8bc4 Checking to make sure that the token with text 'class' or 'interface' has whitespace after it to be considered a block statement, otherwise treat as object literal 2022-04-02 22:42:35 -02:30
Liam Newman
4e56dca3e1
Merge branch 'main' into remove_whitespace_number 2022-03-31 08:59:46 -07:00
Liam Newman
33df40fcdc
Merge pull request #1997 from mhnaeem/feature/support-import-meta-syntax
feature: support import.meta syntax
2022-03-29 11:59:19 -07:00
kcamsanc
47c63b65fb [ISSUE 1846] Resolve indent issue with class method named in 2022-03-28 21:57:31 -04:00
kcamsanc
3145b1d4a3 Revert "hi"
This reverts commit 5223190cb0.
2022-03-28 20:13:46 -04:00
kcamsanc
5223190cb0 hi 2022-03-28 20:13:09 -04:00
Muhammad Hammad
f270c194eb feature: support import.meta syntax and treat it different from an import statement 2022-03-05 17:58:43 -03:30
Muhammad Hammad
d9358dcc96 additions: Added support for logical NULL, AND, OR assignments for the beautifier. Related to ticket #1991 2022-03-05 14:44:28 -03:30
bhaveshvasnani
fce2471d9e regex for js implementation, need to do the same for py 2022-02-18 19:17:39 +05:30
Bhavesh Vasnani
e62e45467e used regex to detect number 2022-02-11 00:09:43 +05:30
Bhavesh Vasnani
88d5f2af4f added logic to detect number before token 2022-02-05 20:17:45 +05:30
Kevin Backhouse
19c5862299
GHSL-2021-113: Fix ReDoS bug (second attempt). 2021-12-08 11:08:37 +00:00
Ansh Saini
e77f74b140 handle bitwise ~ operator 2021-06-25 01:08:24 +05:30
Liam Newman
60228b35c4
Merge pull request #1947 from hmnd/fix/handlebars-partials-with-params
Support handlebars partial blocks with parameters
2021-06-23 14:56:21 -07:00
Reshma R
6ca0918cf3 remove redundant condition 2021-06-23 21:53:00 +05:30
David Roizenman
f8829d5af8
Support handlebars partial blocks with parameters
Fixes #1946
2021-06-22 01:23:03 -07:00
Reshma R
1871e177e3 push changes after "make all" 2021-06-19 13:02:14 +05:30
Reshma R
7c94edb307 issue #1683: fix switch case indentation
problem: Wrong indentation observed when the last line in a case is a right
brace.

solution: Deindent for case/default token is skipped whenever the previous
token is a right brace.
However this logic doesn't always work as highlighted in the issue.
Added code to skip deindent only if the closing right brace corresponds to
opening left brace of case action block.
2021-06-19 01:39:56 +05:30
Rheidner
3e678a41ff Issue beautify-web#1934 modify number regex to allow bigint octals, binarys and hexadecimals. 2021-05-24 11:44:45 -03:00
Liam Newman
c59643abd4
Merge pull request #1800 from TomAnthony/fix-selector_separator_newline-on-extend
Fix erroneous newline added on @extend statements
2021-05-20 15:29:28 -07:00
Liam Newman
47043fb0fc
Merge pull request #1844 from mrmonroe/issue/underscores_1836
Numbers should be allowed to contain underscores.
2021-05-20 13:03:59 -07:00
Timo Tijhof
5a0823ae69 Use native mkdirSync instead of 'mkdirp' package
In Node.js 10 and later, recursive mkdir is available in core.
<https://nodejs.org/docs/latest-v10.x/api/fs.html#fs_fs_mkdirsync_path_options>
2021-05-17 22:04:28 +01:00
Liam Newman
fd055237e5 Merge remote-tracking branch 'upstream/main' into fix-selector_separator_newline-on-extend 2021-04-20 14:08:44 -07:00
Ze Yu
0983909c4b Update documentation wording 2021-04-20 15:29:27 +08:00
Ze Yu
9b6344393f Update comment 2021-04-20 15:22:19 +08:00
Ze Yu
d8bcf29f68 Allow min_attrs=1 for force-expand-multiline 2021-04-20 14:18:45 +08:00
Ze Yu
6edbfb5450 Add minimum attributes option for html attribute wrap 2021-04-20 12:48:37 +08:00
Tom Anthony
4c650f971e Add tests for @extend newline error. 2021-04-18 13:43:11 +02:00
Liam Newman
ca4751520b Full support for underscores in numbers
We chose to be more permissive with underscore and not reformate invalid placements of them.
Leaving unchanged is slightly odd but it also prevents the beautifier from trying to guess
what the user actually meant.
2021-04-15 13:17:14 -07:00
Liam Newman
8769c05bf7 Merge remote-tracking branch 'upstream/main' into issue/underscores_1836 2021-04-15 10:09:03 -07:00
Liam Newman
4e9d767254 Do not commit generated test files 2021-04-15 08:32:54 -07:00
Liam Newman
bbc1d9254e Tweak regex for short php 2021-04-10 15:18:38 -07:00
Alzamer
bb6fb6ce49 Added PHP short tag handling 2021-04-10 22:54:41 +02:00
athiramanu
62e5910271 Add unit test for input scanner - updated 2021-03-13 18:10:42 +05:30
athiramanu
eaf7560149 Add unit tests for input scanner 2021-03-13 16:41:53 +05:30
Liam Newman
bff3edea3d
Merge branch 'main' into fix-selector_separator_newline-on-extend 2021-03-08 11:42:38 -08:00
Liam Newman
ebc9c8fe6c
Merge branch 'main' into issue/underscores_1836 2021-02-09 14:04:51 -08:00
mayankshouche
18c7503f45 Fix for obj?.[expr] optional chaining syntax 2021-01-26 09:12:37 -08:00
raobhavya92
8c2357ddd5 Issue #1858- Switch condition spacing 2021-01-26 00:00:55 +05:30
Liam Newman
86806de649
Merge pull request #1860 from JuanFML/tagged-literals
Fixing bug #1244
2021-01-08 14:43:48 -08:00
Liam Newman
b6af0d08c6
Merge pull request #1867 from JuanFML/css-max-newlines
Added option max_preserve_newlines in CSS beautifier
2021-01-08 14:38:20 -08:00
Liam Newman
c14d055354
Merge branch 'master' into tagged-literals 2020-12-30 12:32:47 -08:00
Juan Medina
8f754e5ee7 Request changes 2020-12-29 13:08:17 -06:00
Liam Newman
0319bdbc24
Merge branch 'master' into css-max-newlines 2020-12-28 10:37:23 -08:00
Liam Newman
5ef4aa3187
Merge branch 'master' into smarty-templating 2020-12-28 10:35:04 -08:00
aswinkumar863
b0dc440d2c
smarty tests for attributes and script 2020-12-26 18:07:04 +05:30
Juan Medina
fba76bd610 Refactor code 2020-12-24 12:56:56 -06:00
Juan Medina
c9bf261fe3 Refactor code to fix code climate 2020-12-24 12:46:06 -06:00
Juan Medina
5ddfa5784b Cleaned commit history and added changes 2020-12-24 12:46:06 -06:00
Juan Medina
5bfad82226 Update tokenizer to accept empty tags 2020-12-23 14:29:44 -08:00
Liam Newman
f42ba31634 Handle literals and add basic test 2020-12-15 11:00:44 -08:00
Juan Medina
f70700c721 Refactor code 2020-12-04 14:24:01 -06:00
Juan Medina
41975ec5f7 Azure DevOps.
Refactor code
2020-12-04 14:12:32 -06:00
Juan Medina
534e6b1a68 Refactor code 2020-12-04 13:59:50 -06:00
Juan Medina
0c1d5d4756 Made requested changes 2020-12-04 13:47:17 -06:00
Juan Medina
7148bec1fe Refactor code 2020-12-03 17:15:24 -06:00
Juan Medina
f110d6143e Fix AzureDevOps errors 2020-12-03 17:13:58 -06:00
Juan Medina
1c0db8eb57 Fixing errors in AzureDevOps 2020-12-03 16:47:21 -06:00
Juan Medina
a321de1bf1 Refactor code 2020-12-03 14:01:17 -06:00
Juan Medina
03e2827210 Fixing codeclimate error
Refactor code in both implementations
2020-12-03 12:59:11 -06:00
Home New
3fb86dce39
removed smarty from auto templating 2020-12-03 16:46:37 +05:30
Juan Medina
95e29b8f9f Fixing bug #1244
Added validations to prevent tagged literals from being modified
2020-12-02 18:31:47 -06:00
aswinkumar863
15747529f5
Basic smarty templating 2020-11-01 19:24:39 +05:30
Matt Monroe
03cbea26f3 Issue #1836 added underscore to binary number_pattern regex plus tests
in s/src/javascript/tokenizer.js and test/data/javascript/tests.js

	modified:   js/src/javascript/tokenizer.js
	modified:   js/test/generated/beautify-javascript-tests.js
	modified:   python/jsbeautifier/tests/generated/tests.py
	modified:   test/data/javascript/tests.js
2020-10-03 02:21:05 -04:00
Liam Newman
e6026e58d3
Merge branch 'master' into fix-selector_separator_newline-on-extend 2020-08-21 11:41:25 -07:00
Liam Newman
c82a98eea7 Added coalescing operator to positioning test 2020-08-12 19:12:57 -07:00
mayankshouche
ba048790e0 Support for nullish coalescing 2020-08-12 13:07:26 -05:00
Liam Newman
3fced5b489 Tweaks and fixes to various edge cases in multline content 2020-07-20 15:17:24 -07:00
Liam Newman
6d30d94407 Add more extensive tests for multiline 2020-07-20 14:58:48 -07:00
Ze Yu
947566fbf3 Add newline for block end tag with multiline child 2020-07-19 14:35:48 +08:00
Ze Yu
491d69a17a Add newline for end tag with empty element child 2020-07-19 14:13:12 +08:00
Liam Newman
49a4a4aec6
Merge pull request #1796 from ang-zeyu/curly_start_newline
Add expand brace-style option to css beautifier
2020-07-07 16:31:02 -07:00
Liam Newman
981e2cb6ef Add tests for new functionality 2020-07-01 16:59:31 -07:00
Ze Yu
5cb53906f0 Add expand brace-style option to css beautifier 2020-06-04 21:25:18 +08:00
Tom Anthony
25048893d4 Fix erroneous newline added on @extend statements when selector_separator_newline is set to true. 2020-05-17 19:42:15 +01:00
Liam Newman
4bc5fcc233 Add support for handlebars partials
Fixes #1756
2020-04-05 11:57:55 -07:00
Liam Newman
c006887868 Add support for es module
Fixes #1706
2020-04-05 09:33:16 -07:00
Liam Newman
a98a43d39d Add support for pipeline operator
Fixes #1530
2020-04-05 09:13:26 -07:00
Liam Newman
71089937ae
Merge pull request #1779 from bitwiseman/issue/1727
Support optional chaining
2020-04-05 09:11:11 -07:00
Liam Newman
81e9d4515c Support optional chaining 2020-04-05 09:02:31 -07:00
Liam Newman
35ed0cd218 Added optional closing of p tags
Fixes #1503
2020-04-03 17:33:25 -07:00
Liam Newman
739a91f862 Fix unquoted attributes with slashes in them
Fixes #1736
2020-01-14 10:51:45 -08:00
Michael Dombrowski
e28329c937 Add test for private field with changed output 2019-12-03 16:02:31 -08:00
Michael Dombrowski
e19cf93ae4 Fix private fields by adding new start token to identifiers 2019-12-03 08:02:39 -08:00
Michael Dombrowski
c26968ab88 Allow # to start identifier, such as private fields in classes
To resolve #1734 , this change adds # which is hex 23 to begin an identifier name.
2019-12-01 17:07:30 -08:00
Orgad Shaneh
4473d62d46 Tests: Fix typo 2019-11-26 09:27:47 +02:00
Liam Newman
510cf7a9a8 Support handlebars unescaped triple curly-braces
Fixes #223
2019-07-18 14:21:40 -07:00
Liam Newman
2b64a03745 Only look for coment and cdata wrappers
Style and script elements can have their contents wrapped in cdata or an html comment.
Do not treat other text, such as php tag as though it were one of the wrappers.
2019-07-17 14:59:31 -07:00
Liam Newman
d6bb56cca5 Support for case with curly braces
Fixes #1357
2019-05-01 17:28:37 -07:00
Liam Newman
d299a74670 Add tests for #1233
Fixes #1233
2019-05-01 16:10:09 -07:00
Liam Newman
a4aa9bb079 Fix css escaping
Fixes #1667
2019-05-01 15:37:34 -07:00