js-beautify
js-beautify copied to clipboard
Chained methods: break all when wrap_line_length is exceeded
Description
With this config:
break_chained_methods = true
wrap_line_length = 80
for method chains, it formatted like this:
document.getElementById('some_id')
.appendChild(document.getElementById('child_to_append')
.content.cloneNode(true));
Now, after this change, it will format method chains like this, breaking on each dot instead of only some:
document
.getElementById('some_id')
.appendChild(document
.getElementById('child_to_append')
.content
.cloneNode(true));
For various reasons i dont have the time, ability, or desire to fully get this PR to completion and merged (along with all the below checks). Im perfectly fine if anyone else wants to finish, rework, or expand it, please, go ahead.
- [ ] Source branch in your fork has meaningful name (not
main)
Before Merge Checklist
These items can be completed after PR is created.
(Check any items that are not applicable (NA) for this PR)
- [ ] JavaScript implementation
- [x] Python implementation (NA if HTML beautifier)
- [ ] Added Tests to data file(s)
- [ ] Added command-line option(s) (NA if
- [ ] README.md documents new feature/option(s)