Converts an HTML tree into the AST the WordML writer consumes.
Every element is looked up in Sablon.Configuration; tags with an AST class
are handed to it, tags without one disappear and pass their properties down
to their children. The nesting rules registered with each tag are enforced
here, so invalid markup fails loudly instead of producing a document Word
refuses to open.
Summary
Functions
Returns true when any of nodes is a block level tag.
Looks a tag up in the configuration, raising when it is not registered.
Converts nodes into AST nodes, seeding them with properties.
Functions
@spec any_block_tags?([Sablon.XML.Node.t()]) :: boolean()
Returns true when any of nodes is a block level tag.
@spec fetch_tag(atom() | binary()) :: Sablon.Configuration.HTMLTag.t()
Looks a tag up in the configuration, raising when it is not registered.
@spec html_to_ast(Sablon.Environment.t(), [Sablon.XML.Node.t()], Sablon.Props.t()) :: [struct()]
Converts nodes into AST nodes, seeding them with properties.