From 26ede1da6aadd741e8c2e668862629463367cf4c Mon Sep 17 00:00:00 2001 From: ache Date: Fri, 9 Aug 2024 04:12:37 +0200 Subject: Lint JavaScript --- src/build/remove-footnote-header.mjs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/build/remove-footnote-header.mjs') 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 } }); }; } - -- cgit v1.2.3-70-g09d2