-
+
diff --git a/src/components/Markdown.tsx b/src/components/Markdown.tsx
index a920573..6522b12 100644
--- a/src/components/Markdown.tsx
+++ b/src/components/Markdown.tsx
@@ -23,6 +23,10 @@ type MarkdownProps = {
size?: MarkdownSize;
};
+type MarkdownNodeWithPosition = {
+ position?: { start?: { line?: number } };
+};
+
function CodeBlock({
className,
children,
@@ -92,7 +96,8 @@ export default function Markdown({
}: MarkdownProps) {
const rehypePlugins: PluggableList | undefined = allowHtml ? [rehypeRaw, rehypeSanitize] : undefined;
const headings = extractMarkdownHeadings(content);
- let headingIndex = 0;
+ const headingIdsByLine = new Map