question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Template/HTML Folding not folding multi line elements properly

See original GitHub issue
  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • 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:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
mika76commented, Sep 10, 2020

This is related to #2234 and was fixed in #2244

1reaction
octrefcommented, Jun 19, 2019

Vetur now only have indentation based folding: https://github.com/vuejs/vetur/issues/899#issuecomment-435943171.

This becomes possible after #899.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found