/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import type { Root } from "mdast"; import type { Node } from "unist"; /** * A remarkjs/unist plugin that inserts HTML anchor nodes before heading text. This is a workaround for GitHub's lack of * automatic heading links in GitHub Releases. GitHub's markdown rendering is inconsistent, and in this case it does not * add automatic links. * * For more details, see: https://github.com/orgs/community/discussions/48311#discussioncomment-10436184 */ export declare function addHeadingLinks(): (tree: Node) => void; /** * A remarkjs/unist plugin that strips soft line breaks. This is a workaround for GitHub's inconsistent markdown * rendering in GitHub Releases. According to CommonMark, Markdown paragraphs are denoted by two line breaks, and single * line breaks should be ignored. But in GitHub releases, single line breaks are rendered. This plugin removes the soft * line breaks so that the markdown is correctly rendered. */ export declare function stripSoftBreaks(): (tree: Node) => void; /** * Given a heading string or regex, removes all the content in sections under that heading. Most useful for removing a * table of contents section that will later be regenerated. Note that the section heading remains - only the inner * content is removed. * * @param options - `heading` is a string or regex that a section's heading must match to be removed. */ export declare function removeSectionContent(options: { heading: string | RegExp; }): (tree: Root) => void; /** * Removes all the headings at a particular level. Most useful to remove the top-level H1 headings from a document. * * @param options - The `level` property must be set to the level of heading to remove. */ export declare function removeHeadingsAtLevel(options: { level: 1 | 2 | 3 | 4 | 5 | 6; }): (tree: Root) => void; /** * Updates URLs of links whose value match a provided value. * * @param options - `checkValue` is a string that will be compared against the link text. Only matching nodes will be * updated. `newUrl` is the new URL to assign to the link. */ export declare function updateTocLinks(options: { checkValue: string; newUrl: string; }): (tree: Root) => void; //# sourceMappingURL=markdown.d.ts.map