Skip to main content

Module fence

Module fence 

Source
Expand description

Who paints a fenced block.

A consumer that needs a block of its own — a chart, a diagram, an embed — reaches for this rather than for a new crate::BlockKind. The vocabulary stays closed because markdown is the wire form and a new kind would have to own a syntax; a fence already has one. It round trips byte for byte, holds a caret in crate::Part::Code, and on a build that installs nothing it paints the source it always did.

The mermaid feature paints a ```mermaid fence the installed renderer leaves, as a diagram.

Installed once at boot like the highlighter, and read at paint.

Modules§

highlight
Who colors a fenced block.

Structs§

Fence
The fence a BlockRenderer is asked to paint.

Constants§

NOTE_SELECTOR
The debug selector on a fence_note.

Functions§

fence_band
The band across the top of a fence_panel, where its label and copy button sit.
fence_note
A note across the bottom of a fence_panel under its code — why the code was not painted — its lines kept as written.
fence_panel
The box a fence is drawn in, painted or as code.

Type Aliases§

BlockRenderer
Paints the block a fence’s info string names, or None to leave it to the ordinary code block.
Rewrite
Replaces the painted fence’s code — see Fence::rewrite.