rework/lightweight #12

Merged
GauthierWebDev merged 106 commits from rework/lightweight into main 2025-04-21 16:27:38 +00:00
2 changed files with 0 additions and 20 deletions
Showing only changes of commit 29a2246ef3 - Show all commits

View File

@ -2,5 +2,4 @@ export type Section = {
id: string;
title: string;
level: 2 | 3;
path: string;
};

View File

@ -124,21 +124,6 @@ const formatExportNode = (): MDXJSEsm => {
method: false,
shorthand: false,
},
{
type: "Property",
key: {
type: "Identifier",
name: "path",
},
value: {
type: "Literal",
value: section.path,
},
kind: "init",
computed: false,
method: false,
shorthand: false,
},
],
})),
},
@ -161,9 +146,6 @@ const remarkHeadingId: Plugin<[], Root> = () => (tree: Root, file) => {
visit(tree, "heading", (node) => {
const lastChild = node.children[node.children.length - 1];
const filePath = file.path;
console.log(`File path: ${filePath}`);
if (lastChild && lastChild.type === "text") {
const string = lastChild.value.replace(/ +$/, "");
const matched = string.match(/ {#(.*?)}$/);
@ -181,7 +163,6 @@ const remarkHeadingId: Plugin<[], Root> = () => (tree: Root, file) => {
id: slug,
title: extractText(node.children),
level: depth,
path: filePath,
});
});