summaryrefslogtreecommitdiff
path: root/src/build/remove-footnote-header.mjs
diff options
context:
space:
mode:
authorache <ache@ache.one>2024-08-09 04:12:37 +0200
committerache <ache@ache.one>2024-08-09 09:22:49 +0200
commit63e297da167713e17fd271958b4109ea44e7075a (patch)
tree38071f632a6c70c89e52c7dae99a4686d76e83e9 /src/build/remove-footnote-header.mjs
parentUpdate toml parser (diff)
Lint JavaScriptnotes
Diffstat (limited to 'src/build/remove-footnote-header.mjs')
-rw-r--r--src/build/remove-footnote-header.mjs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/build/remove-footnote-header.mjs b/src/build/remove-footnote-header.mjs
index a238692..95f481b 100644
--- a/src/build/remove-footnote-header.mjs
+++ b/src/build/remove-footnote-header.mjs
@@ -1,17 +1,16 @@
-import {visit} from 'unist-util-visit';
+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';
+ 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
}
});
};
}
-