Skip to content

Commit

Permalink
chore(markdown): add missing typing
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschmidt committed Jun 26, 2024
1 parent bd6c521 commit b98e219
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/markdown/markdown-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import rehypeStringify from 'rehype-stringify';
import rehypeRaw from 'rehype-raw';
import { visit } from 'unist-util-visit';
import { sanitizeStyle } from './sanitize-style';
import { Node } from 'unist';

/**
* Takes a string as input and returns a new string
Expand Down Expand Up @@ -46,7 +47,7 @@ export async function markdownToHTML(
},
})
.use(() => {
return (tree: any) => {
return (tree: Node) => {
// Run the sanitizeStyle function on all elements, to sanitize
// the value of the `style` attribute, if there is one.
visit(tree, 'element', sanitizeStyle);
Expand Down

0 comments on commit b98e219

Please sign in to comment.