module documentation

Utilities related to Stan tree building and HTML flattening.
Function flatten Convert a document fragment from a Stan tree to HTML.
Function flatten​_text Return the text inside a stan tree.
Function html2stan Convert an HTML string to a Stan tree.
Constant ​_RE​_CONTROL Undocumented
def flatten(stan):
Convert a document fragment from a Stan tree to HTML.
Parameters
stan:FlattenableDocument fragment to flatten.
Returns
strAn HTML string representation of the stan tree.
def flatten_text(stan):
Return the text inside a stan tree.
Parameters
stan:Union[Tag, str]Undocumented
Returns
strUndocumented
Note
Only compatible with Tag objects.
def html2stan(html):
Convert an HTML string to a Stan tree.
Parameters
html:Union[bytes, str]An HTML fragment; multiple roots are allowed.
Returns
TagThe fragment as a tree with a transparent root node.
_RE_CONTROL =

Undocumented

Value
re.compile(('[' + ''.join(ch for ch in map(chr, range(0, 32)) if ch not in
    '\r\n\t\x0c') + ']').encode())