-
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
Allow to configure the "custom elements as inline elements" behavior #2113
Comments
PR welcome. It might make sense to reuse the existing ... Wait a minute. Before you do any work, could you please show exactly what your input, desired output, and actual output are? From you description it sounds like this could be a bug. If I go to https://beautifier.io/ and put in:
This input remains unchanged. I'm not sure from your description if that is correct or not... |
@bitwiseman I don't think this s a bug, sorry if I wasn't clear
<div><child-stub><div>hello</div></child-stub></div>
<div>
<child-stub>
<div>hello</div>
</child-stub>
</div>
<div><child-stub>
<div>hello</div>
</child-stub></div> Does that match what you're expecting after landing aa82eb9 ? Regarding the option, I was leaning towards adding an extra one to make things simple, but I understand your idea. I'll take a look and open a PR with whatever I come up with so we can start a conversation. |
@bitwiseman I started a PR introducing a new |
Hello there! I just wanted to point out that as this is a breaking change for VTU, any new version can't be applied, then moderate vulnerability in |
Description
Hi team! And thank you for your work on js-beautify.
I'm part of the Vue core team, and I'm one of the maintainers of the Vue Test Utils library. We use js-beautify in VTU to make the tested HTML prettier in the output. So for example, you can test something like:
There are thousands of tests out there that use this (VTU has 1.3 million downloads per week).
js-beautify v1.14.7 introduced a new behavior in aa82eb9 which is quite breaking for us, as all elements with a dash are now wrapped differently. And VTU uses elements with a
-stub
suffix when stubbing components, so a test that would usually succeed like:now fails if we update to v1.14.7 as the output of js-beautify is now
<child-stub><h1>Hello</h1></child-stub>
.You can see that a lot of the VTU tests are failing when trying to bump to the new version of js-beautify here.
It would be awesome if we could configure this behavior to disable it and keep the output as it was in VTU, thus avoiding the developers that use VTU having to update all their tests, or us getting stuck on v1.14.6.
A new option like
custom_element_as_inline_element
(that could be true by default, but that we could switch to false to restore the previous behavior) would be very helpful.Do you think that can be possible?
The text was updated successfully, but these errors were encountered: