Skip to content

Custom code highlighter extension - #31

Merged
koculu merged 2 commits into
mainfrom
custom-code-highlighter-extension
Oct 14, 2026
Merged

koculu merged 2 commits into
mainfrom
custom-code-highlighter-extension

Conversation

@koculu

@koculu koculu commented Oct 14, 2026

Copy link
Copy Markdown
Member

Change

Plugins can now customize code rendering and backend creation through PureStackMarkdown.

  • Add resolveHighlighter(lang) to select a renderer in plugin order, falling back to the default highlighter when all resolvers return null. Both resolution and rendering support sync and async execution.
  • Add createShiki(options) and createHighlightJs() factories for custom backend initialization. Reject competing factories for the selected backend.
  • Support custom block HTML, fragments, and empty output in Markdown and Regor MDX, including fences inside components.
  • Rename the shared highlighting module to codeHighlighting.ts, document the API, and add regression coverage.
  • Bump workspace versions and generator metadata to 1.1.11.

Validation

  • Repository TypeScript check: yarn tsc --noEmit passed, including tests.
  • Focused plugin, Markdown, MDX, and highlighting suites: 97 tests passed.
  • Biome and diff checks passed.

@koculu
koculu merged commit 65ab55d into main Oct 14, 2026
2 checks passed
@koculu
koculu deleted the custom-code-highlighter-extension branch October 14, 2026 15:29
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.

1 participant