[Bug]: markdown.highlightLanguages
config does not take effect
#1026
Labels
markdown.highlightLanguages
config does not take effect
#1026
Version
Details
In Rspress doc https://rspress.dev/api/config/config-build#markdownhighlightlanguages
Here can be understood as we can configure aliases to map some unsupported languages to the languages supported by prism( etc
['mdx', 'tsx']
), or we can also make an abbreviation for a certain language ( etc['oc', 'objectivec']
)But now there should be some problems in existing implementation, below code block are not highlighted.
Reproduce link
https://github.com/web-infra-dev/rspress/tree/main/e2e/fixtures/basic
Reproduce Steps
rspress.config.ts
['mdx', 'tsx']
is theDEFAULT_HIGHLIGHT_LANGUAGES
inrspress/packages/shared/src/runtime-utils/index.ts
Lines 11 to 26 in e421433
You can also try
['mdx', 'md']
, may be also check whether there are any problems with the logic of merging and deduplication highlight languages.index.mdx
(since github will transform the raw code, so screenshot here)
run
pnpm dev
see if the code is highlighted
The text was updated successfully, but these errors were encountered: