Repository navigation
VS Code: highlight diagrams written :::mermaid ... ::: - #223
Merged
Merged
Conversation
py-doc draws a diagram written in the Azure DevOps form, :::name ... :::, for every diagram language, but the extension highlighted only backtick fences, so a :::mermaid block showed as plain text. Each diagram language now has a :::name rule beside its fence rule, and the general fenced-div rule leaves those lines to it. A Python test keeps the list in step with py-doc's renderers. The README's troubleshooting covers another extension's grammar colouring ordinary words. 2.3.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WHtcxeRPPmXcydfxoEHGJ4
The first test builds the extension twice (npm ci and vsce) and runs PowerShell three times. On a Windows runner that takes about two minutes, at the edge of the suite's 120 s pytest timeout, and it went over on #223. These tests now have 900 s, matching the 600 s each PowerShell run may take. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WHtcxeRPPmXcydfxoEHGJ4
Owner
Author
|
Test (windows-latest) failed on 90a03fb with a pytest The cause is the test's time budget, not the code. The first test builds the real extension twice ( Fixed in 562977a: those tests now have Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
py-doc draws a diagram written in the Azure DevOps form,
:::name…:::, for every diagram language (diagrams/scan.py). The extension highlighted only backtick fences, so a:::mermaidblock showed as plain text. A real document with these blocks showed the gap.Changes
:::namerules for every diagram language:syntaxes/pydoc-fences.markdown.tmLanguage.jsonhas one beside each language's backtick-fence rule, ending at a line of only colons, as py-doc reads it.:::bpmntuses the bpmn-text grammar. Poster blocks have no:::form in py-doc, so none is added.:::rule: thefenced-divrule inpydoc.markdown.tmLanguage.jsonnow leaves these lines alone, so::: notesand::: {.pagebreak}are still highlighted as divs.:::mermaid. The fix is to inspect a coloured word's scopes and, if none ends in.pydoc, disable the other extension for the workspace.Testing
:::mermaidblock is highlighted as Mermaid, the paragraph after it is plain Markdown again, and::: notesstays a div. It passes with the stand-in host and with VS Code 1.105's Markdown grammar.:::rules cover exactly the diagram fences py-doc's renderers define.:::mermaidblocks come out as Mermaid;xmlblock ismeta.embedded.block.xml.npm run lint && npm test: 32 passed, 1 skipped without the real grammar.pytest tests/test_editor_grammar.py: 3 passed.ruffis clean, and the README lints clean with Vale.vsce packagebuilds the 2.3.1.vsix.Generated by Claude Code