Skip to main content

Crate vertigo_cmark

Crate vertigo_cmark 

Source

Re-exports§

pub use self;

Structs§

CMarkStyle
Options
Option struct containing flags for enabling extra features that are not part of the CommonMark spec.
SafeHtml
Elements and attributes from ammonia’s default whitelist, links and images only with safe destinations (is_safe_url). Scripts, styles, event handlers, frames, forms and javascript: addresses don’t get through. Elements outside the whitelist lose just their tags; <script> and <style> go away together with their content.
TrustedHtml
Everything as written, scripts included — only for content you control.

Enums§

ElementAction
What happens to an element of raw HTML.

Traits§

HtmlPolicy
Decides what of raw HTML and link destinations gets into the rendered tree.

Functions§

events_to_vertigo
Converts a stream of pulldown-cmark events to Vertigo tree with provided styling and policy for raw HTML and link destinations.
is_safe_url
Whether the address is relative (/page, #note, image.png) or has one of the schemes ammonia accepts by default (https:, mailto:…) — so never javascript:, vbscript:, data: or file:. The scheme is read the way browsers read it: without spaces and control characters around the address, without tabs and newlines inside (java\tscript:) and regardless of case.
to_vertigo
Converts a CommonMark string to Vertigo tree with default options and styling.
to_vertigo_opts
Converts a CommonMark string to Vertigo tree with provided Options and default styling.
to_vertigo_opts_styled
Converts a CommonMark string to Vertigo tree with provided Options and provided styling.
to_vertigo_styled
Converts a CommonMark string to Vertigo tree with default options and provided styling.