@telefonica/markdown-confluence-sync
Version:
Creates/updates/deletes Confluence pages based on markdown files in a directory. Supports Mermaid diagrams and per-page configuration using frontmatter metadata. Works great with Docusaurus
18 lines (17 loc) • 707 B
JavaScript
// SPDX-FileCopyrightText: 2024 Telefónica Innovación Digital
// SPDX-License-Identifier: Apache-2.0
import { remove } from "unist-util-remove";
/**
* UnifiedPlugin to remove footnotes from the AST.
*
* @see {@link https://github.com/syntax-tree/mdast#footnotes | Footnotes}
* @see {@link https://github.com/syntax-tree/mdast#footnotedefinition | GFM Footnote Definition}
* @see {@link https://github.com/syntax-tree/mdast#footnotereference | GFM Footnote Reference}
*/
const remarkRemoveFootnotes = function remarkRemoveFootnotes() {
return function (tree) {
remove(tree, "footnoteDefinition");
remove(tree, "footnoteReference");
};
};
export default remarkRemoveFootnotes;