Dispatch helpers shared by every AST node.
An AST node is a struct whose module implements to_docx/1, children/1,
put_children/2 and describe/1. Keeping the contract this small is what
lets an application register its own AST class for a custom HTML tag.
Summary
Functions
Applies visitor to ast and, recursively, to its children.
Renders an attribute map as XML attributes, prefixed with a space.
The child AST nodes of ast.
Converts a single CSS property, walking style_chain in order.
A compact textual rendering of the tree, mirroring #inspect in the Ruby
gem. Useful in tests and when debugging a conversion.
Collects every node in the tree for which pattern matches.
Maps CSS properties onto their WordML equivalents.
Replaces the child AST nodes of ast.
Serialises an AST node to WordML.
Functions
Applies visitor to ast and, recursively, to its children.
A visitor is a module (or a function) returning the node it was given,
possibly modified - which is how Sablon.HTMLConverter.Visitor strips the
trailing newline of a paragraph.
Renders an attribute map as XML attributes, prefixed with a space.
The child AST nodes of ast.
Converts a single CSS property, walking style_chain in order.
A compact textual rendering of the tree, mirroring #inspect in the Ruby
gem. Useful in tests and when debugging a conversion.
Collects every node in the tree for which pattern matches.
@spec process_properties([atom()], Sablon.Props.t()) :: Sablon.Props.t()
Maps CSS properties onto their WordML equivalents.
style_chain names the converter tables to search, from the most specific
AST node to :node; keys that are already atoms are WordML properties and
are passed through untouched.
Replaces the child AST nodes of ast.
Serialises an AST node to WordML.