vue `v-else-if` wrong formatting
See original GitHub issueIf in blade template there is this tag
<span v-else-if="value.name === 'Name'">
formatting turns it into
<span v-else-if="value.name === 'Name'" v-else-if="value.name === 'Name'">
Issue Analytics
- State:
- Created 9 months ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Ugly formatting html in .vue file · Issue #5844 · prettier ... - GitHub
I just updated prettier in my vue project and now in a SFC .vue file it's formatting this code: Lista into this:
Read more >Conditional Rendering - Vue.js
v-if is “real” conditional rendering because it ensures that event listeners and child components inside the conditional block are properly destroyed and re- ......
Read more >Vue conditional rendering: editing existing todos
Result: editCancelled() method is invoked, which sets this.isEditing back to false , so that the edit form is no longer shown on re-render....
Read more >How to get vue's v-else-if functionality in angular?
</div> <ng-template #elseBlock>Content to render when condition is false.</ng-template>. You can refer to the documentation.
Read more >Conditional Directives With Vue.js - DigitalOcean
Now, the button will not show because isLoggedIn is set to false . Setting the data.isLoggedIn value to true would add the button...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks!
Also I noticed it keeps adding this string on every iteration. So after several formattings I get this:
Fixed at https://github.com/shufo/prettier-plugin-blade/releases/tag/v1.8.3