Skip to main content

html_to_styled

Function html_to_styled 

Source
pub fn html_to_styled(html: &str, style: DocStyle) -> StyledText
Expand description

Parse an HTML fragment into a styled document.

A tag-soup reader, not a browser: it tracks the inline tags and inline style properties Day can express and ignores everything else, including <script>/<style> contents, which it skips wholesale. Unknown tags are transparent: their text survives, their meaning does not.

Day API ↩ Guides· daybrite.dev