Crate html5ever_arena_dom

Source
Expand description

A simple library to parse templates, and tidy them up using html5ever.

This library simply extracts and combines two usage examples of html5ever, and makes them re-usable. It is mostly meant to be used with template engines such as Askama or nate, which use fmt::Write to output their generated HTML data.

Structs§

ArenaSink
Sink struct is responsible for handling how the data that comes out of the HTML parsing unit (TreeBuilder in our case) is handled.
ArenaSinkParser
A wrapper for Parser<ArenaSink<'_>> that implements fmt::Write and io::Write.
Node
DOM node which contains links to other nodes in the tree.
TidyTemplateaskama

Traits§

TidyTemplateExtaskama
Extension trait to wrap a Template in TidyTemplate.

Functions§

render
Render a template into a writer, e.g. a Vec<u8>.
tidy
Tidy up an input string.