Template/HTML Folding not folding multi line elements properly
See original GitHub issueInfo
- Platform: MacOs
- Vetur version: 0.20.0
- VS Code version:1.33.1
Problem
With the following htm (where attributes have been split over multiple lines and closing bracket is on own line)
<div
class="someclass"
style="somestyle"
>
<div class="inner"></div>
<div class="inner2"></div>
</div>
When trying to fold/collapse the first div, it does not collapse until it’s closing </div>
tag but only collapses the opening tag and it’s attributes. The rest of the inner tags are still exposed…
Basically it ends up looking like:
<div...
<div class="inner"></div>
<div class="inner2"></div>
</div>
In a normal HTML file all the inner tags are also folded and hidden and only the start and end tag are visible. eg:
<div...
</div>
Reproducible Case
Very easy to reproduce. Just split multiple attributes of a tag onto their own lines. Then try and fold that element.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Indenting HTML tags on multiple lines - Stack Overflow
Break long lines into multiple lines of acceptable length: ... the closing > is more readable but when use vscode it can't fold...
Read more >HTML syntax folding in Vim? - Vi and Vim Stack Exchange
1830), the default HTML syntax script only folds a multi-line tag itself, not the text between the opening and closing tag. So, this...
Read more >RFC 2822: Internet Message Format
RFC 2822 Internet Message Format April 2001 Note: This standard is not ... field can be split into a multiple line representation; this...
Read more >UltraEdit's syntax highlighting and code folding tutorial
Explanation of highlighting and folding definitions in the UltraEdit/UEStudio wordfile.
Read more >Code Folding | IntelliJ IDEA Documentation - JetBrains
Use this page to specify the default code folding settings. For shortcuts on how to expand or collapse code elements, refer to the...
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 FreeTop 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
Top GitHub Comments
This is related to #2234 and was fixed in #2244
Vetur now only have indentation based folding: https://github.com/vuejs/vetur/issues/899#issuecomment-435943171.
This becomes possible after #899.