Skip to content

cross-reference-html.ts#

View Markdown

Source

3 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.

3 symbols 1 functions 1 variables 1 modules 2 parameters 1 returns

Reference#

modulecross-reference-htmlThe escaping and prose-scanning helpers the citation pass still needs. The cross-reference pass that used to share this…

The escaping and prose-scanning helpers the citation pass still needs.

The cross-reference pass that used to share this file now runs in ox_content_transform::cross_references; what is left here is what citations.ts uses, and it goes the same way when that pass moves.

View source

variableconst PROTECTED_TEXT_RE = /<!--[\s\S]*?-->|<(pre|code|script|style|textarea|a)\b[\s\S]*?<\/\1>/giThe escaping and prose-scanning helpers the citation pass still needs. The cros…

The escaping and prose-scanning helpers the citation pass still needs.

The cross-reference pass that used to share this file now runs in ox_content_transform::cross_references; what is left here is what citations.ts uses, and it goes the same way when that pass moves.

Signature

const PROTECTED_TEXT_RE = /<!--[\s\S]*?-->|<(pre|code|script|style|textarea|a)\b[\s\S]*?<\/\1>/gi

View source

fntransformText(html: string, replacer: (text: string) => string): stringRuns replacer over every stretch of prose, skipping verbatim elements.

Runs replacer over every stretch of prose, skipping verbatim elements.

Signature

export function transformText(html: string, replacer: (text: string) => string): string

View source

Parameters

  • html string
  • replacer (text: string) => string

Returns

string