@@ -0,0 +1,22 @@
1+import { Ast, Config, Node, Tag } from "@markdoc/markdoc";
2+
3+export const footnoteItem = {
4+ attributes: {
5+ id: { type: String, render: true, required: true },
6+ href: { type: String, render: false, required: true },
7+ },
8+ transform(node, config) {
9+ node.attributes.class = `footnote-item`;
10+ const anchor = new Ast.Node(
11+ "link",
12+ { class: "footnote-anchor", href: node.attributes.href },
13+ [new Ast.Node("text", { content: "↩" })]
14+ );
15+ node.push(anchor);
16+ return new Tag(
17+ "li",
18+ node.transformAttributes(config),
19+ node.transformChildren(config)
20+ );
21+ },
22+};