Skip to content

Conversation

@jkrumbiegel
Copy link

Fixes #521

I dug into this issue (with the help of Claude) and it turned out that the div plugin didn't see the closing ::: fences at all. So in principle what all the downstream code got was a huge nested structure of divs, never getting closed. This could then swallow up code blocks, making them appear just as normal markdown paragraphs and not executable ones (they never even got registered as code blocks). Apparently adding paragraph to div's alt entry lets ::: without preceding newlines be matched as div fences again instead of paragraph content. For me this fixed all of the examples I could try from #521 (except the as I now understand unrelated math one with inline $$).

@jkrumbiegel jkrumbiegel changed the title Allow ::: without preceding empty line to be parsed as closing div Allow ::: without preceding empty line to be parsed as closing div Dec 19, 2025
@cderv cderv requested a review from vezwork December 22, 2025 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS Code: Problem with identifying code chunk in the presence of complex structure

1 participant