Skip to content

Commit

Permalink
Merge pull request #256 from ganta/migrate-to-highlightjs-new-api
Browse files Browse the repository at this point in the history
fix: Migrate to highlight.js's new API
  • Loading branch information
ganta committed Mar 29, 2021
2 parents e61f9f1 + b3bbc8c commit 2b13654
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/markdown/renderer/marktone-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class MarktoneRendererHelper {
if (!hljs.listLanguages().includes(specifiedLanguage)) {
language = languageAliases[specifiedLanguage] || "plaintext";
}
const highlightedCode = hljs.highlight(language, code).value;
const highlightedCode = hljs.highlight(code, { language }).value;
const highlightedCodeWithInlineStyle = highlightedCode.replace(
/class="([\w-]+)"/g,
(matchedString, className) => {
Expand Down

0 comments on commit 2b13654

Please sign in to comment.