Skip to content

Commit f031595

Browse files
committed
Fix crash when highlighting unsupported languages
Resolves #2609
1 parent e9bd40b commit f031595

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- Anchor links are no longer incorrectly checked for relative paths, #2604.
1111
- Fixed an issue where line numbers reported in error messages could be incorrect, #2605.
1212
- Fixed relative link detection for markdown links containing code in their label, #2606.
13+
- TypeDoc will no longer crash when asked to render highlighted code for an unsupported language, #2609.
1314

1415
### Thanks!
1516

src/lib/output/themes/MarkedPlugin.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ export class MarkedPlugin extends ContextAwareRendererComponent {
221221
this.parser = markdown({
222222
...this.markdownItOptions,
223223
highlight: (code, lang) => {
224-
code = highlight(code, lang || "ts");
224+
code = this.getHighlighted(code, lang || "ts");
225225
code = code.replace(/\n$/, "") + "\n";
226226

227227
if (!lang) {

0 commit comments

Comments
 (0)