Skip to content

Commit

Permalink
Fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
remcohaszing committed Sep 20, 2023
1 parent 5bba472 commit b48f110
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { type ElementContent } from 'hast'
import { fromHtmlIsomorphic } from 'hast-util-from-html-isomorphic'
import { type BlockContent, type Code, type Parent, type Root } from 'mdast'
import {
Expand Down Expand Up @@ -57,7 +58,7 @@ const remarkMermaid: Plugin<[RemarkMermaidOptions?], Root> = (options) => {

if (result.status === 'fulfilled') {
const { svg } = result.value
const hChildren = fromHtmlIsomorphic(svg, { fragment: true }).children
const hChildren = fromHtmlIsomorphic(svg, { fragment: true }).children as ElementContent[]
parent.children[nodeIndex] = {
type: 'paragraph',
children: [{ type: 'html', value: svg }],
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
},
"devDependencies": {
"@playwright/test": "^1.0.0",
"@types/hast": "^3.0.0",
"c8": "^8.0.0",
"eslint": "^8.0.0",
"eslint-config-remcohaszing": "^10.0.0",
Expand Down

0 comments on commit b48f110

Please sign in to comment.