Skip to content

[codex] Improve MarkdownRenderer code blocks#84

Merged
zhuowcui merged 1 commit into
mainfrom
codex/rich-markdown-code-blocks
May 17, 2026
Merged

[codex] Improve MarkdownRenderer code blocks#84
zhuowcui merged 1 commit into
mainfrom
codex/rich-markdown-code-blocks

Conversation

@Xueyang-Song

Copy link
Copy Markdown
Collaborator

Summary

  • upgrades MarkdownRenderer code blocks with native chrome, copy actions, line numbers, syntax highlighting support, metadata parsing, diff/highlight states, and improved selection/copy behavior
  • adds optional TextMate syntax-highlighting package and sample/docs coverage
  • polishes related markdown surfaces including tables, abbreviation tooltips, high-contrast defaults, and accessibility metadata

Details

  • introduces code block metadata parsing, rich CodeBlockBox, copy-button localization/accessibility, and provider-based async syntax highlighting
  • adds a bounded/provider-aware highlight cache and viewport-biased scheduling
  • fixes code-block copy button selection behavior, lazy-reflow handler preservation, code-block chrome drag selection, and heading marker preservation in copied markdown
  • adds tests for metadata parsing, TextMate highlighting, source-map heading affixes, cache behavior, high contrast defaults, and keyboard/focus metadata

Validation

  • dotnet test .\MarkdownRenderer\MarkdownRenderer.Tests\MarkdownRenderer.Tests.csproj -p:Platform=x64
  • dotnet build .\MarkdownRenderer\MarkdownRenderer.SyntaxHighlighting.TextMate\MarkdownRenderer.SyntaxHighlighting.TextMate.csproj -p:Platform=x64
  • dotnet build .\MarkdownRenderer\MarkdownRenderer.Sample\MarkdownRenderer.Sample.csproj -p:Platform=x64 -p:OutDir=C:\Users\neroc\.codex\tmp\MarkdownRendererSampleBuild\out\
  • dotnet test .\MarkdownRenderer\MarkdownRenderer.PixelTests\MarkdownRenderer.PixelTests.csproj -p:Platform=x64
  • dotnet test .\JitHub.WinUI.Tests\JitHub.WinUI.Tests.csproj -p:Platform=x64
  • dotnet build .\JitHub.slnx -p:Platform=x64
  • dotnet pack .\MarkdownRenderer\MarkdownRenderer\MarkdownRenderer.csproj -p:Platform=x64 -o C:\Users\neroc\.codex\tmp\MarkdownRendererPackages
  • dotnet pack .\MarkdownRenderer\MarkdownRenderer.SyntaxHighlighting.TextMate\MarkdownRenderer.SyntaxHighlighting.TextMate.csproj -p:Platform=x64 -o C:\Users\neroc\.codex\tmp\MarkdownRendererPackages

Note: full solution build still reports the existing NETSDK1198 missing win-x64.pubxml warning.

@zhuowcui zhuowcui marked this pull request as ready for review May 17, 2026 18:52
@zhuowcui zhuowcui merged commit e816e2c into main May 17, 2026
1 check passed
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.

2 participants