Issue
There is a block of code in the markdown document for example:
```[language]
Some text here
```
If the [language] is not supported by highlight.js, the highlight.highlight() throws an exception and the rendering crashes. The browser gets an error Cannot GET with the code 404 Not Found.
Suggested fix
Add a try-catch block when calling highlight method.
Render a plain text and throw an error log instead of interrupting a renderer.
Issue There is a block of code in the markdown document for example:
If the [language] is not supported by highlight.js, the
highlight.highlight()
throws an exception and the rendering crashes. The browser gets an errorCannot GET
with the code404 Not Found
.Suggested fix Add a try-catch block when calling highlight method. Render a plain text and throw an error log instead of interrupting a renderer.