Skip to content

Commit

Permalink
fix(content): codeblock parse lang should support other meta (#691)
Browse files Browse the repository at this point in the history
When codeblock contains other meta, it should not break lang parsing in utils.parseThematicBlock
  • Loading branch information
fuxingloh authored Jan 22, 2021
1 parent 7fbb5ef commit 881f6d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/content/parsers/markdown/handlers/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const toAst = (h, node) => (highlighted) => {
}

module.exports = highlighter => (h, node) => {
const lang = node.lang + (node.meta || '')
const lang = node.lang + ' ' + (node.meta || '')
const { language, lineHighlights, fileName } = parseThematicBlock(lang)
const code = node.value ? detab(node.value + '\n') : ''

Expand Down

0 comments on commit 881f6d4

Please sign in to comment.