/usr/lib/python3/dist-packages/html5lib/__pycache__
Edit: /usr/lib/python3/dist-packages/html5lib/__pycache__/html5parser.cpython-310.pyc (88411B)
o
V=^ @ s d dl mZmZmZ d dlmZmZ d dlZddlm Z ddlm
Z
ddlmZ ddlm
Z
dd lmZ dd
lmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z d d
dZ!d!ddZ"dd Z#G dd de$Z%ej&dd Z'dd Z( d"ddZ)G dd de*Z+dS )# )absolute_importdivisionunicode_literals)with_metaclassviewkeysN )_inputstream)
_tokenizer)treebuilders)Marker)_utils)spaceCharactersasciiUpper2LowerspecialElementsheadingElements
cdataElementsrcdataElements
tokenTypes
tagTokenTypes
namespaceshtmlIntegrationPointElements"mathmlTextIntegrationPointElementsadjustForeignAttributesadjustMathMLAttributesadjustSVGAttributesE_ReparseExceptionetreeTc K s( t |}t||d}|j| fi |S )a Parse an HTML document as a string or file-like object into a tree
:arg doc: the document to parse as a string or file-like object
:arg treebuilder: the treebuilder to use when parsing
:arg namespaceHTMLElements: whether or not to namespace HTML elements
:returns: parsed tree
Example:
>>> from html5lib.html5parser import parse
>>> parse('
This is a doc
')
namespaceHTMLElements)r
getTreeBuilder
HTMLParserparse)doctreebuilderr kwargstbp r( 6/usr/lib/python3/dist-packages/html5lib/html5parser.pyr" s
r" divc K s, t |}t||d}|j| fd|i|S )a# Parse an HTML fragment as a string or file-like object into a tree
:arg doc: the fragment to parse as a string or file-like object
:arg container: the container context to parse the fragment in
:arg treebuilder: the treebuilder to use when parsing
:arg namespaceHTMLElements: whether or not to namespace HTML elements
:returns: parsed tree
Example:
>>> from html5lib.html5libparser import parseFragment
>>> parseFragment('this is a fragment')
r container)r
r r!
parseFragment)r# r+ r$ r r% r&