Skip to content
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

feat: add option closing-bracket-newline for html #2236

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zhaojjiang
Copy link

Description

#1707

  • [html-closing-bracket-newline]

New Option for HTML: closing-bracket-newline

  • this option decide whether add newline before tag's closing bracket or not
  • it only worked when tag already has wrapped attributes
  • so this option can be combined with option wrap-attributes

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
  • 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)

@bitwiseman
Copy link
Member

@zhaojjiang
That's for the PR. I'm not sure I understand why a new option is needed.
The issue talks about fixing "wrap-attributes": "preserve".

@zhaojjiang
Copy link
Author

@zhaojjiang That's for the PR. I'm not sure I understand why a new option is needed. The issue talks about fixing "wrap-attributes": "preserve".

yes, the issue's title is about wrap-attributes, but newline before closing bracket is mentioned:

Please fix "preserved" or add a new option for keeping the line break before the closing angle bracket.

I also need this feature for preserve-aligned please!

so I add a new option to add a newline, and keep wrap-attributes option working as before

@zhaojjiang
Copy link
Author

@zhaojjiang That's for the PR. I'm not sure I understand why a new option is needed. The issue talks about fixing "wrap-attributes": "preserve".

We can ignore that issue mentioned above, I can edit and remove it from this pr.

I really think this new option closing-bracker-newline is helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants