refactor: remove ts-ignore
This commit is contained in:
@@ -32,9 +32,7 @@ function getDecorations({ doc, name, lowlight }: { doc: ProsemirrorNode, name: s
|
|||||||
.forEach(block => {
|
.forEach(block => {
|
||||||
let from = block.pos + 1
|
let from = block.pos + 1
|
||||||
const { language } = block.node.attrs
|
const { language } = block.node.attrs
|
||||||
// TODO: add missing type for `listLanguages`
|
const languages = lowlight.listLanguages()
|
||||||
// @ts-ignore
|
|
||||||
const languages = lowlight.listLanguages() as string[]
|
|
||||||
const nodes = language && languages.includes(language)
|
const nodes = language && languages.includes(language)
|
||||||
? lowlight.highlight(language, block.node.textContent).value
|
? lowlight.highlight(language, block.node.textContent).value
|
||||||
: lowlight.highlightAuto(block.node.textContent).value
|
: lowlight.highlightAuto(block.node.textContent).value
|
||||||
|
|||||||
Reference in New Issue
Block a user