You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When README.md contains a language not supported by TypeDoc syntax highlighting, v0.25.13 simply logs a warning, while v0.26.0 has turned this into a hard error.
In the use case, TypeDoc cannot highlight the ABNF language (and there isn't a Shiki option for this language), but GitHub can highlight this language.
Therefore, I'd like to keep the abnf tagging in the README file, so that readers browsing on GitHub can see the highlighted syntax.
Search terms
ShikiError highlight language
Expected Behavior
Upon seeing an unsupported language, TypeDoc should log a warning and render this language as plain text.
Actual Behavior
Upon seeing an unsupported language, TypeDoc exits with error:
TypeDoc exiting with unexpected error:
ShikiError: Language `abnf` not found, you may need to load it first
at Object.getLanguage (file:///home/runner/work/typedoc-repros/typedoc-repros/node_modules/@shikijs/core/dist/index.mjs:5436:19)
at codeToTokensBase (file:///home/runner/work/typedoc-repros/typedoc-repros/node_modules/@shikijs/core/dist/index.mjs:530:31)
at file:///home/runner/work/typedoc-repros/typedoc-repros/node_modules/@shikijs/core/dist/index.mjs:674:62
at Array.map (<anonymous>)
at codeToTokensWithThemes (file:///home/runner/work/typedoc-repros/typedoc-repros/node_modules/@shikijs/core/dist/index.mjs:674:53)
at Object.codeToTokensWithThemes (file:///home/runner/work/typedoc-repros/typedoc-repros/node_modules/@shikijs/core/dist/index.mjs:5520:52)
at DoubleHighlighter.highlight (/home/runner/work/typedoc-repros/typedoc-repros/node_modules/typedoc/dist/lib/utils/highlighter.js:70:41)
at highlight (/home/runner/work/typedoc-repros/typedoc-repros/node_modules/typedoc/dist/lib/utils/highlighter.js:162:24)
at Object.highlight (/home/runner/work/typedoc-repros/typedoc-repros/node_modules/typedoc/dist/lib/output/themes/MarkedPlugin.js:259:56)
at default_rules.fence (/home/runner/work/typedoc-repros/typedoc-repros/node_modules/markdown-it/dist/index.cjs.js:567:27)
error Command failed with exit code 6.
Steps to reproduce the bug
Insert an unsupported language block in README.md and build the project, like this:
```abnf
; taken from RFC5234
name = elements crlf
```
I just ran into this too when looking at your repo for memory issues, I wrote all the code to do this, and apparently then never called the function that handled missing languages properly...
When README.md contains a language not supported by TypeDoc syntax highlighting, v0.25.13 simply logs a warning, while v0.26.0 has turned this into a hard error.
In the use case, TypeDoc cannot highlight the ABNF language (and there isn't a Shiki option for this language), but GitHub can highlight this language.
Therefore, I'd like to keep the
abnf
tagging in the README file, so that readers browsing on GitHub can see the highlighted syntax.Search terms
ShikiError highlight language
Expected Behavior
Upon seeing an unsupported language, TypeDoc should log a warning and render this language as plain text.
Actual Behavior
Upon seeing an unsupported language, TypeDoc exits with error:
Steps to reproduce the bug
Insert an unsupported language block in README.md and build the project, like this:
Code: TypeStrong/typedoc-repros#41
Failing build: https://github.com/TypeStrong/typedoc-repros/actions/runs/9628193855/job/26556161522
Environment
The text was updated successfully, but these errors were encountered: