Skip to content

Commit

Permalink
fix: make tsc happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate Moore committed May 19, 2022
1 parent 7dd0096 commit 5dd8ee4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/markdown/remark/src/rehype-collect-headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export default function createCollectHeaders() {
if (isJSX) {
// HACK: for ids that have JSX content, use $$slug helper to generate slug at runtime
node.properties.id = `$$slug(\`${text.replace(/\{/g, '${')}\`)`;
node.type = 'raw';
node.value = `<${node.tagName} id={${node.properties.id}}>${raw}</${node.tagName}>`;
(node as any).type = 'raw';
(node as any).value = `<${node.tagName} id={${node.properties.id}}>${raw}</${node.tagName}>`;
} else {
node.properties.id = slugger.slug(text);
}
Expand Down

0 comments on commit 5dd8ee4

Please sign in to comment.