function withoutLinksTo
withoutLinksTo(
markdown: string,
matcher: LinkMatcher,
): string

Replace each markdown link whose target matches matcher with its plain text. Used to strip links the viewer isn't allowed to open (e.g. owner-only admin pages) before rendering — a rendered link is a promise that it works, so a viewer who can't follow it gets the words without the link.

Parameters

markdown: string
matcher: LinkMatcher

Return Type

string

Usage

import { withoutLinksTo } from "docs/utilities.ts";