Skip to main content

Module html

Module html 

Source
Expand description

Helper functions dealing with HTML conversion.

Traits§

HtmlStr
This trait deals with tagged HTML &str data.
HtmlString
This trait deals with tagged HTML String data.

Functions§

assign_heading_ids
Assigns an id attribute to every heading in html that doesn’t already have one, according to policy. A heading’s existing id — whether an explicit Markdown {#id} heading attribute or one another renderer already assigned (e.g. RST’s own auto-ids) — always wins and is never touched. Markup-language agnostic: this runs on the final rendered HTML, after markup_to_html has already produced <h1>-<h6> tags, regardless of which renderer produced them.
rewrite_links
A helper function that scans the input HTML document in html_input for HTML hyperlinks. When it finds a relative URL (local link), it analyzes it’s path. Depending on the local_link_kind configuration, relative local links are converted into absolute local links and eventually rebased.