-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Range Ignore Support in HTML #5508
Comments
Anyone currently working on this? If not I'm happy to pick this up. |
@jimmyhoran It's up for grabs, go ahead! 👍 |
This adds support for the prettier-ignore-start and prettier-ignore-end comment markers in html based languages, allowing prettier to preserve existing formatting of multi-element sections of code. Fixes prettier#5508.
This adds support for the prettier-ignore-start and prettier-ignore-end comment markers in html based languages, allowing prettier to preserve existing formatting of multi-element sections of code. Fixes prettier#5508.
This adds support for the prettier-ignore-start and prettier-ignore-end comment markers in html based languages, allowing prettier to preserve existing formatting of multi-element sections of code. Fixes prettier#5508.
👋 Alan here from ampproject/amphtml. We'd like to use I've made a comment on the attached pull request for context. We'd love to help. |
Would love to see this implemented. HTML gets used in various places and templating tools where formatting everything may not be appropriate. One use case I have is Eleventy's HTML templates. They use YAML frontmatter to set up data for the engine. That YAML formatting will be broken by the HTML formatter. While the best solution here is probably a plugin specific to Eleventy's style, this sort of thing isn't too uncommon in a generalised way so being able to throw in a range ignore where no plugin exists would be great. Hopefully someone with Prettier knowledge can pick up #6693 ! Wish I had the knowledge to finish that PR :/ |
any updates on this feature? |
Prettier 1.15.2
Playground link
Input:
Output:
Expected behavior:
Keep Input.
Now that HTML support has landed in Prettier it would be nice, if we could use range ignore for the same reasons it is supported in Markdown.
💡 The best solution for the example above would be, if underscore templates could be treated as JavaScript, but range ignore would be a great start to mix HTML with several other templating flavors.
The text was updated successfully, but these errors were encountered: