-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove brace_style = "collapse-preserve-inline" and add brace_preserve_inline new option #1058
Conversation
First: Wow! Way to dive in! Thanks! Next: I'm sorry, but I'm going to have squash your dreams a bit.
Finally: Seriously, thank you for contributing. |
This change still accepts "collapse-preserve-inline", it just rewrites it However that ends up being defined in the config I really had no issues I should probably add a test though for backward compatibility though. I'll |
Change still accepts |
@Coburn37 - Just waiting for your changes. @evocateur @einars |
Comma-delimited "meta option" values make sense, here. Another common pattern (easier to implement with most cli arg parsers) is repeated flags that evaluate to arrays, e.g. |
re:repeated flags, Comma-separating might kick a can of worms open — I So, I'd probably just split such options on non-[a-z0-9-_] characters. |
…ve-inline Adds compatibility for old collapse-preserve-inline Changes all defaults, documentation, and README to match Adds tests for this stuff
jsHinted and fixed Updated documentation to reflect this Fixed a documentation error in README.md
Basically I tried to follow around wherever brace_style, frame_inline, collapse-preserve-inline, and modify it to work with the new frame_inline for all brace_styles instead of just the one
I'm running on windows so I don't have the ability to use the sh files :c
So jsbeautifyrc used collapse-preserve-inline and I mistaken switched it without applying brace_preserve_inline, which changed ALL the styling. Should be fixed now
2 new tests * 5 matrix items = 10 tests Updated matrix template names so they made more sense
For the two opt packages being used in the project:
As for the configuration file, the csv list would be the easiest to do. To support multiple values of one argument, I'm going to go ahead with the comma separation for now, if that needs to change so be it. I would rather not change the type of the config files property. |
@Coburn37 - There isn't strong opinion either way, and you're the one writing it, so it is your call whether you want to do commas or multiple args. The worst case is it gets changed later. 😄 |
Removed brace_preserve_inline from everywhere Correctly validates CLI arguments in both Python and Javascript
For the CI builds
So now there's no Anyway, the build says failing but it looks like a Python SSL error that I have no way of fixing (and one of the Travis CI subbuilds actually passed if you look in there) so someone will need to retrigger the builds. |
Anyone have any input on whether the order of the csv values in |
@@ -384,6 +383,9 @@ | |||
<input class="checkbox" type="checkbox" id="detect-packers"> | |||
<label for="detect-packers">Detect packers and obfuscators?</label> | |||
<br> | |||
<input class="checkbox" type="checkbox" id="brace-preserve-inline"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we get more csv parameters, this will need to change. Fine for now.
@Coburn37 - They should processed in order and if the settings conflict the last one should win. The following two should have the same result:
However, that is something that can be done in another PR (which I really hope you'll do). This PR has gone on long enough. You've done great work. I'm merging and we can iterate further changes. |
* Per specifications at end of beautifier#1058, takes multiple parameters using the last one * Still rejects invalid parameters and rewrites compatible ones
* Per specifications at end of beautifier#1058, takes multiple parameters using the last one * Still rejects invalid parameters and rewrites compatible ones
Added brace_preserve_inline and removed brace+style = "collapse-preserve-inline"
Adds compatibility for old collapse-preserve-inline
Changes all defaults, documentation, and README to match
Adds tests for this stuff
Code is jsHinted
Adds new option --brace-preserve-inline, -V, and new property brace_preserve_inline to opt object