Liam Newman
3d61d6ddc4
Python parity for features
2013-06-09 16:25:58 -07:00
Liam Newman
ae8dcd88c0
Tweaks to recent commits
2013-06-09 16:25:58 -07:00
Liam Newman
34451389b6
Tests for newline preservation at close of expression
...
Closes #239
2013-06-09 16:25:58 -07:00
Liam Newman
b5b90a9a39
Allow newline preservation for function declarations
2013-06-09 16:25:58 -07:00
Liam Newman
68a8542d6d
Minimal indenting for expressions and arrays
...
Closes #281
2013-06-09 16:25:58 -07:00
Liam Newman
95250c6f48
Do not indent html element content
...
Most formatters I've seen flatten the html tag since it is always present
2013-06-09 14:55:52 -07:00
Liam Newman
e5b8834919
Support preserve newlines after start and end tags
2013-06-09 14:45:39 -07:00
Liam Newman
812dd55009
Merge pull request #274 from sapienlab/master
...
Add support for Asynchronous Module Definition (AMD) API
2013-06-09 11:14:46 -07:00
Liam Newman
151f213d7d
Unformatted at the start of a new line should not add extra space
...
Fixes #285
2013-06-08 20:32:59 -07:00
Liam Newman
2016e5b2a9
Added (still disabled) tests for #256
2013-06-08 19:47:46 -07:00
Liam Newman
a9f3d1a309
Minor fixes based on feedback from @Infocatcher
2013-06-07 14:31:46 -07:00
Liam Newman
62f467c3ce
Deprecate html beautifier max_char
2013-06-07 12:04:24 -07:00
Liam Newman
71d251582f
Preserve newlines option in html beautifier
...
Closes #280
2013-06-07 12:04:24 -07:00
Rasmus Erik Voel Jensen
ce4451b5fe
e4x xml matching regexp missed some valid element/attribute names - js implemented - ascii charset only
2013-06-07 13:03:55 +02:00
Liam Newman
e231618b1a
Merge pull request #279 from DBCDK/e4x-inline-expression
...
E4X xml-literal small fixes
2013-06-06 07:54:21 -07:00
Rasmus Erik Voel Jensen
09c8134dda
E4X python tests and implementation of xml literal inline expressions, CDATA, and quotes (+ improved tests in JavaScript)
2013-06-06 09:54:07 +02:00
Liam Newman
75cccc4371
Simplify conditional comment formatting
...
We now treat tags between if-endif conditionals as comments.
This is not ideal, but is significantly better than it was.
Closes #91
2013-06-05 21:41:40 -07:00
Rasmus Erik Voel Jensen
3fc2d503dd
e4x quote in xml literal: more tests
2013-06-06 06:27:01 +02:00
Rasmus Erik Voel Jensen
47b8d072b0
e4x single quotes in e4x xml literals
2013-06-04 15:20:33 +02:00
Rasmus Erik Voel Jensen
5208038578
e4x CDATA support
2013-06-04 09:56:14 +02:00
Liam Newman
e3c02e1f27
Mkdirp when using -o option
...
Closes #270
2013-06-03 13:47:15 -07:00
Liam Newman
70a46754d2
Function and inline statement indentation fixes
...
I don't like to close multiple bugs in a one shot, but these all tie together and overlap.
Fixes #268
Fixes #275
Fixes #276
2013-06-03 13:15:59 -07:00
Rasmus Erik Voel Jensen
c4069204f7
e4x handle inline expressions in tagname or property value of e4x inline xml
2013-06-03 21:39:40 +02:00
Rodrigo González
1b856de26c
Add support for Asynchronous Module Definition (AMD) API
...
See http://requirejs.org/docs/whyamd.html
2013-06-02 22:59:57 -03:00
Liam Newman
8fe8e64922
Merge pull request #267 from will-v-king/master
...
added a deindent() function .
2013-05-26 21:10:28 -07:00
will
7ef99798d8
add deindent() function in both js/lib/beautify.js and python/jsbeautifier/__init__.py .
...
deindent() is used to reverse the indent() action.
2013-05-27 10:24:00 +08:00
Liam Newman
a1113ff472
One more test for brace formatting
...
Closes #268
2013-05-26 13:44:37 -07:00
Liam Newman
6f0ab2e754
Fix brace format flip-flop
...
Fixes #258
2013-05-25 21:19:23 -07:00
Liam Newman
772437e8dc
Streamline block comment code path
...
Related to #258
2013-05-24 21:50:51 -07:00
Liam Newman
6210928940
Test for another brace indenting case
...
Closes #262
2013-05-24 19:08:00 -07:00
Liam Newman
3f3fd7bf5c
Do not add extra space during keep_array_indentation
...
Also, handle a few more edge cases while using keep array indentation
Fixes #263
2013-05-24 18:56:43 -07:00
Liam Newman
dd1c5d01d7
Add tests for keep_array_indentation = false
2013-05-24 17:27:09 -07:00
Liam Newman
8ec9cb1dd4
Cleaner expression and array litteral indenting
...
Fixes #259
2013-05-24 16:41:29 -07:00
Liam Newman
1fa788702f
Ensure beautified output is the same when rebeautified
...
#258 surfaced and interersting issue that was not caught by the
current test framework. Now the framework checks that beautified
output is unchanged after being run through the beautifier again.
Adding this check immediately found a bug in the beautification of
function declarations. Fixed that as well.
2013-05-09 14:34:15 -07:00
Liam Newman
bc82f08dbf
Merge pull request #241 from johnkpaul/fix_issue_241
...
Beautifying function call chains that end with a callback results in incorrect formatting
2013-05-08 12:05:02 -07:00
John K. Paul
cb4ae314aa
Fix #241 , check if dot after newline, and change indentation
2013-05-08 14:21:10 -04:00
Ken Struys
c081cdde0e
fixed broken run tests script
2013-05-02 17:31:33 -07:00
Liam Newman
85e3464a4d
Add e4x option santization
...
This got lost during the pull request somehow.
2013-04-29 13:29:07 -07:00
Liam Newman
c8e53084bc
Support loading beautifiers into global if other options fail
...
Closes #249
2013-04-28 13:17:48 -07:00
Einar Lielmanis
e9d19c4113
p.acker unpacker: add the missing test
2013-04-28 10:09:33 +03:00
Einar Lielmanis
fd14728506
Minor update of p_a_c_k_e_r unpacking
...
Splitting into the packed chunks was failing, if the packed code
contained "{}))" string of symbols. Now the detection is sliiiightly
better.
2013-04-28 02:26:42 +03:00
Liam Newman
e8352cdbd0
Make functions inside arrays behave like sub-array literals.
...
function declarations inside array literals should behave like
a sub-array declaration: [[a,b],[c,d]] should format about the same as [function(){},[c,d]]
This is not perfect, but it is better than it was and we now have test coverage.
Closes #246
2013-04-26 15:08:38 -07:00
Liam Newman
82e18999a1
Tests for spaces inside square bracket support
...
Introduced but not tested as part of #235 .
Closes #126 .
2013-04-25 11:47:06 -07:00
Liam Newman
a1fa05c4b0
Make "// comment" stay on the same line when input indicates it
...
Closes #242
2013-04-23 11:43:22 -07:00
Liam Newman
deb38fe531
Rename wanted_newline to input_wanted_newline
2013-04-23 09:38:13 -07:00
Liam Newman
54701f8996
Merge remote-tracking branch 'rasmuserik/e4x'
...
Conflicts:
js/test/beautify-tests.js
2013-04-21 18:51:17 -07:00
Liam Newman
fd00a7e245
Tests for space_in_paren false that match
...
The pattern I've been using for options is to have the same inputs, and
test for the differing outputs.
2013-04-19 15:14:37 -07:00
Liam Newman
aad87666ca
Make e4x pay-for-play - no effect when option not enabled
2013-04-19 14:46:43 -07:00
Rasmus Jensen
7dbd03a2d3
more tests + robustness fix for unterminated xml literal
2013-04-19 16:27:35 +02:00
Rasmus Jensen
b90b6b9bac
move xml-literal handling into TK_STRING section
2013-04-19 14:27:14 +02:00
Rasmus Jensen
3f4676bde1
more test-cases
2013-04-19 12:58:14 +02:00
Rasmus Jensen
7f9c57358c
use opt instead of options; use bt instead of test_fragment
2013-04-19 12:39:45 +02:00
Rasmus Jensen
58bac2f623
merge
2013-04-19 12:31:03 +02:00
Rasmus Jensen
9497dc5865
rename --pad-in-paren to --space-in-paren
2013-04-19 12:27:34 +02:00
Liam Newman
bc62583fd5
Remove expand-strict and fix brace tests
...
While removing expand-strict, found that brace tests were uneven.
Made all tests appear for all three settings, and adjusted for each.
There are still some minor odd behaviors around empty braces, but they are
non-breaking.
Closes #236 , #237
2013-04-19 00:28:10 -07:00
Rasmus Jensen
7ab458f487
tests
2013-04-18 08:39:11 +02:00
Rasmus Jensen
8d4e460259
Merge github.com:einars/js-beautify into e4x
2013-04-18 08:19:57 +02:00
Rasmus Jensen
aab53a7eb2
updated tests, such that e4x is off by default, and xml-literal is tested both with and without e4x option enabled
2013-04-18 08:18:54 +02:00
Liam Newman
fb071807a8
Test CLI missing file output for html and css
2013-04-16 10:04:47 -07:00
Liam Newman
79e7eea27c
Python test shell script output for missing input file
2013-04-16 09:55:56 -07:00
Liam Newman
bf09af14e6
Typo fix in shell text
2013-04-14 17:15:04 -07:00
Liam Newman
9355d6a0a1
Clean up the shell smoke tests
2013-04-14 15:24:38 -07:00
Liam Newman
e91a12e551
Add shell smoke tests for node.js cli
...
First steps for #209
2013-04-13 18:59:19 -07:00
Rasmus Jensen
5bbad19a1c
use output_space_before_token, instead of deprecated print_single_space
2013-04-12 11:44:31 +02:00
Rasmus Jensen
ee9c61b8bb
bugfix: -h option did not work due to path of package.json not updated in cli.js
2013-04-12 11:38:52 +02:00
Rasmus Jensen
f8cda9cf13
padding space in paren
2013-04-12 11:36:20 +02:00
Rasmus Jensen
0036967763
option for ignoring e4x literals
2013-04-12 11:21:44 +02:00
Rasmus Jensen
e10042eecd
test case
2013-04-12 11:13:01 +02:00
Liam Newman
44586d7a60
Add tweak to switch/case tests
...
Provide counter test using same inputs for jslint_happy = false.
Additional for #230 , #213 .
2013-04-10 16:40:17 -07:00
Mathieu Quinette
39275fc613
Add tests for jslint_happy switch/case.
2013-04-09 21:40:19 +02:00
Mathieu Quinette
0c29aaa902
close #213 : jslint_happy option will make switch/case at same indent level.
2013-04-09 10:20:33 +02:00
Liam Newman
ddc44e65c4
Add $HOME to config chain
...
Most direct fix.
Closes #228 .
2013-04-08 12:56:37 -07:00
Mathieu Quinette
9086a796d6
Use index so testj will error if pathway is incorrect.
2013-04-08 09:03:05 +02:00
Mathieu Quinette
11f2b5975f
Fix path to beautify libs.
2013-04-07 09:16:04 +02:00
Liam Newman
9de057f94c
Reorganize file structure by language/platform
...
Moved all files that are specifically for the website into web (except for index.htm)
Moved all files that are javascript (for node or web) into js
Organized js folder to generally follow node structures
This change also changes .npmignore to include unpackers in the package.
First step on #224 .
2013-04-04 15:51:19 -07:00