Skip to content

Commit

Permalink
Fix JSX highlighting by passing language to Prism
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Jan 7, 2020
1 parent c2aeda2 commit 2532f61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/docusaurus-1.x/lib/core/renderMarkdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class MarkdownRenderer {
// Currently people using prismjs on Node have to individually require()
// every single language (https://github.com/PrismJS/prism/issues/593)
loadLanguages([language]);
return prismjs.highlight(str, prismjs.languages[language]);
return prismjs.highlight(str, prismjs.languages[language], language);
} catch (err) {
if (err.code === 'MODULE_NOT_FOUND') {
const unsupportedLanguageError = chalk.yellow(
Expand Down

0 comments on commit 2532f61

Please sign in to comment.