U ÀÒ.e³Ð ã @ s d dl mZmZmZ d dlmZmZ d dlZd dlm Z ddl mZ ddl mZ ddl m Z dd lmZ dd l mZ ddlmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z" d!dd„Z#d"dd„Z$dd„ Z%G dd„ de&ƒZ'ej(dd„ ƒZ)dd„ Z*d#dd„Z+G dd „ d e,ƒZ-dS )$é )Úabsolute_importÚdivisionÚunicode_literals)Úwith_metaclassÚviewkeysN)ÚOrderedDicté )Ú_inputstream)Ú _tokenizer)Útreebuilders)ÚMarker)Ú_utils)ÚspaceCharactersÚasciiUpper2LowerÚspecialElementsÚheadingElementsÚ cdataElementsÚrcdataElementsÚ tokenTypesÚ tagTokenTypesÚ namespacesÚhtmlIntegrationPointElementsÚ"mathmlTextIntegrationPointElementsÚadjustForeignAttributesÚadjustMathMLAttributesÚadjustSVGAttributesÚEÚ_ReparseExceptionÚetreeTc K s$ t |¡}t||d}|j| f|Ž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
')