-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Why ignore em/strong/span? #7
Comments
👍 I'm curious about this as well. For my use case beautifying spans improves the readability of some code examples. This is great overall though, thanks! |
The main reason was that I believe you can override the defaults by passing an |
That makes sense. Thanks @jonschlinkert ! |
Please continue to ignore inline elements. Don't break my markup like Prettier does. Prettier will change:
to:
which changes the rendered output from: text (something here) and stuff to: text ( something here ) and stuff Making the code more legible = good, altering the rendered output = bad. |
It is possible for you to print it out the way you want, and for others to printed out the way they want.
Although you can do this, it doesn't seem to have any effect: strong and em are still on the same lines as their parents. Relevant issue: beautifier/js-beautify#1900 Here is how you can achieve this: // eslint-disable-next-line @typescript-eslint/no-explicit-any
return pretty($.html(), { unformatted: [], inline: [] } as any); By the way, there are a lot of options that are undocumented and not in the types. Would it be possible to add what's missing? |
I get ignoring something like
pre
, but was just curious why span tags are not beautified.The text was updated successfully, but these errors were encountered: