vscode-markdown-languageservice icon indicating copy to clipboard operation
vscode-markdown-languageservice copied to clipboard

Allow folding html tags with blank new lines

Open mjbvz opened this issue 3 years ago • 1 comments

Tracks enabling folding of html in markdown such as:

<details>

Some text

</details>

This is currently not foldable because it is (correctly) tokenized to two html elements instead of a single html block

mjbvz avatar Feb 28 '23 00:02 mjbvz

This is currently not foldable because it is (correctly) tokenized to two html elements instead of a single html block

Oh, interesting: yeah, it looks like that tokenizer represents the structure with the help of the nesting and level attributes? I do see a single HTML node in the rendered DOM:

a screenshot of the dom with the paragraph element inside the details element

Although, this makes me a little suspicious of the token stream:

<details>

<details>

some text

</details>

</details>

does get rendered as I'd expect:

another dom screenshot with two nested details elements with a <p> tag inside

but I can't see a way from the tokens to determine that the second <details> is inside of the first <details> (they both have level/nesting 0).

sethp avatar Mar 01 '23 01:03 sethp