summaryrefslogtreecommitdiff
path: root/src/build/remove-footnote-header.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'src/build/remove-footnote-header.mjs')
-rw-r--r--src/build/remove-footnote-header.mjs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/build/remove-footnote-header.mjs b/src/build/remove-footnote-header.mjs
new file mode 100644
index 0000000..a238692
--- /dev/null
+++ b/src/build/remove-footnote-header.mjs
@@ -0,0 +1,17 @@
+import {visit} from 'unist-util-visit';
+
+// This plugin is an example to let users write HTML with directives.
+// It’s informative but rather useless.
+// See below for others examples.
+/** @type {import('unified').Plugin<[], import('mdast').Root>} */
+export default function specialBox() {
+ return tree => {
+ visit(tree, node => {
+ if (node?.tagName === 'h2' && node?.properties?.id === 'footnote-label') {
+ node.tagName = 'hr';
+ node.children = []; // Exposure of children, Roman's way
+ }
+ });
+ };
+}
+