You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fenced code blocks should support any number of backticks > 3 in textmate grammar #6189
Context
Split from dart-lang/dartdoc#4284. {@example} can currently emit a fence that is too short when the example itself contains a fence. Once dartdoc uses longer fences, and because users can already hand-write them, doc comments with nested fences will be more common.
On the left, we have pkg:markdown + DAS, and on the right, only TextMate.
See that after the ```console line, we open the initial code block, but we should already have one.
Environment
Workspace Environment
Dart Code extension: 3.143.20260901
App: Visual Studio Code
App Host: desktop
Version: linux 1.138.0
Workspace type: Dart (LSP)
Workspace name: bug
Dart (3.14.0-edge.9a097b7923e08d0ebc26b3f5339aa80ad53e88bf): /home/fmorschel/dart
Flutter (3.47.4): /home/fmorschel/.puro/envs/stable/flutter (No device)
Output from 'dart info'
/home/fmorschel/dart/bin/dart info
If providing this information as part of reporting a bug, please review the information
below to ensure it only contains things you're comfortable posting publicly.
changed the title [-]Verify render fenced code blocks with 4+ backticks (nested fences)[/-][+]Fenced code blocks should support any number of backticks > 3[/+]on Sep 23, 2026
changed the title [-]Fenced code blocks should support any number of backticks > 3[/-][+]Fenced code blocks should support any number of backticks > 3 in textmate grammar[/+]on Sep 24, 2026
Activity
[-]Verify hover/completion docs render fenced code blocks with 4+ backticks (nested fences)[/-][+]Verify render fenced code blocks with 4+ backticks (nested fences)[/+][-]Verify render fenced code blocks with 4+ backticks (nested fences)[/-][+]Fenced code blocks should support any number of backticks > 3[/+]DanTup commentedon Sep 23, 2026
We might also need to verify if the analyzer is handling these correctly for the semantic tokens.
FMorschel commentedon Sep 23, 2026
From the screenshot above on the left, it seems like it, doesn't it? What specifically do you mean to check?
[-]Fenced code blocks should support any number of backticks > 3[/-][+]Fenced code blocks should support any number of backticks > 3 in textmate grammar[/+]DanTup commentedon Sep 24, 2026
Yeah, I think you're right - I just did some testing and the semantic tokens seem to come through fine.
I've a PR at #6197 to fix the grammar:
Before (the orange areas should all be a single code block):
After:
And related PRs for upstream changes are: