UNPKG

@jsdevtools/rehype-url-inspector

Version:

A rehype plugin to inspect, validate, or rewrite URLs anywhere in an HTML document

13 lines (12 loc) 520 B
import { Processor, Transformer } from "unified"; import { Node } from "unist"; import { Options } from "./options"; import { HtmlElementNode } from "./types"; /** * This is a rehype plugin to validate and rewrite URLs anywhere in an HTML document. */ export declare function inspectUrls(this: Processor, opts?: Options): Transformer; /** * Crawls all descendant nodes and returns each one that matches one of the specified tag names. */ export declare function crawl(node: Node): IterableIterator<HtmlElementNode>;