When I save MD document to HTML document, the `code block language highlighting` function doesn't work properly.
hustnzj opened this issue · 1 comments
Summary
When I save MD document to HTML document, the code block language highlighting
function doesn't work properly.
...
Expected behavior
...
Actual behavior
...
Steps to reproduce
-
type the .md
-
in vscode,
command + shift + P
, and type the command as below:
-
Open the output html in the browsers (chrome, firefox, safari etc)
Code example
$a$
$\varphi$
$1+1=2$
$1+1<3$
```js
document.write('Hello, world')
The reason I guess
Open the console
panel of the browsers, I found the error tip:
Refused to apply style from 'https://cdn.jsdelivr.net/npm/highlight.js@9.18.1/lib/index.min.js' because its MIME type ('application/javascript') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
And I found the link src tag is used for the https://cdn.jsdelivr.net/npm/highlight.js@9.18.1/lib/index.min.js
. Why is it not script tag?
I tried to use the script tag instead of the link one, but still got this error as below:
I tried to modify the extension.js
in the extension root menu, but still didn't work.
Environment
Operating system: macOS Big Sur
VSCode version: 1.55.2
Markdown+Math version: 2.5.1
Link to highlight.js
has become invalid.
Works again with mdmath version 2.6.