Module

PuduLangDocgen.Markdown.Phrase

View source

Inline HTML with checked links, images, and cross references

Types

Name Description
Rendering Site-wide choices about how article content renders
Scope Where a page is published and what its links may reach
Out Rendered pieces and facts gathered while rendering one page

Functions

Name Description
rendering Rendering choices used when a site configures none.
start An empty accumulator.
emit The accumulator with text appended.
report The accumulator with a diagnostic recorded.
need The accumulator noting that a page needs a client feature such as `math` or `mermaid`.
inlines Inline nodes appended as HTML; `origin` is the file the nodes were written in.
destination The browser destination of a written link, recording local targets for validation. Unsafe and unknown destinations produce diagnostics and answer the empty text.
referenceHref A browser destination to a reference, relative to the page unless remote.

rendering

Rendering choices used when a site configures none.

Returns

Rendering

View source

start

fn start() -> Out

An empty accumulator.

Returns

Out

View source

emit

fn emit(out: Out, text: Str) -> Out

The accumulator with text appended.

Parameters

out
Out
text
Str

Returns

Out

View source

report

fn report(out: Out, found: Docgen.Diagnostic) -> Out

The accumulator with a diagnostic recorded.

Parameters

out
Out
found
Docgen.Diagnostic

Returns

Out

View source

need

fn need(out: Out, feature: Str) -> Out

The accumulator noting that a page needs a client feature such as math or mermaid.

Parameters

out
Out
feature
Str

Returns

Out

View source

inlines

fn inlines(out: Out, nodes: &Array[Syntax.Inline], context: &Scope, origin: Str) -> Out

Inline nodes appended as HTML; origin is the file the nodes were written in.

Parameters

out
Out
nodes
&Array[Syntax.Inline]
context
&Scope
origin
Str

Returns

Out

View source

destination

fn destination(out: Out, target: &Syntax.Target, context: &Scope, origin: Str, image: Bool) -> (Out, Str)

The browser destination of a written link, recording local targets for validation. Unsafe and unknown destinations produce diagnostics and answer the empty text.

Parameters

out
Out
target
&Syntax.Target
context
&Scope
origin
Str
image
Bool

Returns

(Out, Str)

View source

referenceHref

fn referenceHref(reference: &Docgen.Reference, context: &Scope) -> Str

A browser destination to a reference, relative to the page unless remote.

Parameters

reference
&Docgen.Reference
context
&Scope

Returns

Str

View source