-
Notifications
You must be signed in to change notification settings - Fork 21
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
Can't pass vetur plugin unit test #74
Comments
That bug must be introduced with https://github.com/Prettyhtml/prettyhtml/releases/tag/v0.5.3 because it's the only place where we changed whitespace handling. I will investigate. |
@StarpTech <a :href="'https://news.ycombinator.com/submitted?id=' + user.id">submissions</a> | |
Hi @xiaomingplus yes it is intended because that was a bug fixed with v0.5.3. In that case the formatter can't know the rendering context e.g <p class="links">
<a :href="'https://news.ycombinator.com/submitted?id=' + user.id">submissions</a> |
<a :href="'https://news.ycombinator.com/threads?id=' + user.id">comments</a>
</p> is not the same as <p class="links">
<a :href="'https://news.ycombinator.com/submitted?id=' + user.id">submissions</a>|
<a :href="'https://news.ycombinator.com/threads?id=' + user.id">comments</a>
</p> |
@StarpTech ,so, you mean that vetur should change their unit test expected output? |
@xiaomingplus yes |
thanks, @StarpTech ,I'll give a pr to vetur~ |
Before you submit an issue we recommend you drop into the Gitter community and ask any questions you have or mention any problems you've had getting started with prettyhtml.
🐛 Bug Report
since the 0.8.2 version seems can't pass the vetur unit test.(https://github.com/vuejs/vetur/blob/master/test/lsp/formatting/basic.test.ts),I think the 0.8.2`s update don't change the template behavior,but 0.8.1 version can pass the test unit ,0.8.2 can't.
I also run
npx prettyhtml VueHNUserView.vue
two times,the result is different.Is it expect?
To Reproduce
Default config.
Steps to reproduce the behavior:
the input is copy from vetur unit test
https://github.com/vuejs/vetur/blob/master/test/fixture/client/formatting/VueHNUserView.vue
Paste your markup here:
Expected behavior
A clear and concise description of what you expected to happen.
Paste the results here:
Context
Vue
Your Environment
The text was updated successfully, but these errors were encountered: