Summary
Fenced code blocks in the MarkdownWidget currently render as read-only EditorWidget instances with line numbers but no syntax highlighting. The language info string (e.g. ```csharp) is parsed and available via FencedCodeBlock.Language` but not yet used for colorization.
Proposed Approach
Integrate with the Editor widget's language server / tokenization infrastructure (see #165) to provide syntax-aware highlighting. This would involve:
- Mapping the markdown language tag to an editor language mode
- Applying token-based styling to the read-only editor content
- Falling back to plain text when no language mode is available
Dependencies
Current State
FencedCodeBlock.Language is already parsed and stored
- Code blocks render via
MarkdownCodeBlockWidget wrapping EditorWidget in read-only mode
- Line numbers are shown; scroll bindings are removed so parent scroll panels work correctly
Labels
Enhancement, MarkdownWidget
Summary
Fenced code blocks in the MarkdownWidget currently render as read-only
EditorWidgetinstances with line numbers but no syntax highlighting. The language info string (e.g. ```csharp) is parsed and available viaFencedCodeBlock.Language` but not yet used for colorization.Proposed Approach
Integrate with the Editor widget's language server / tokenization infrastructure (see #165) to provide syntax-aware highlighting. This would involve:
Dependencies
Current State
FencedCodeBlock.Languageis already parsed and storedMarkdownCodeBlockWidgetwrappingEditorWidgetin read-only modeLabels
Enhancement, MarkdownWidget