Sindbad~EG File Manager
�
(ٜg�J � �V � d Z dgZddlZddlZddlmZmZmZmZm Z ddl
mZmZ ddl
Z
ddlmZmZ ddl
mZmZmZmZ ddlmZ d Z G d� de � Z G d
� dej: � Z G d� de� Z G d� dejB � Z" G d� de"� Z#y# e$ rZdd
lmZ dZY dZ[�^dZ[ww xY w)�MIT�HTML5TreeBuilder� N)�DetectsXMLParsedAsHTML�
PERMISSIVE�HTML�HTML_5�HTMLTreeBuilder)�NamespacedAttribute�nonwhitespace_re)�
namespaces�prefixes)�Comment�Doctype�NavigableString�Tag)�_baseF)�baseTc �@ � e Zd ZdZdZeeeegZdZ d d�Z
d� Zd� Zd� Z
y)
r a Use html5lib to build a tree.
Note that this TreeBuilder does not support some features common
to HTML TreeBuilders. Some of these features could theoretically
be implemented, but at the very least it's quite difficult,
because html5lib moves the parse tree around as it's being built.
* This TreeBuilder doesn't use different subclasses of NavigableString
based on the name of the tag in which the string was found.
* You can't use a SoupStrainer to parse only part of a document.
�html5libTNc # � K � || _ |rt j dd�� t j |d�� |d d df�� y �w)NzjYou provided a value for exclude_encoding, but the html5lib tree builder doesn't support exclude_encoding.� ��
stacklevelF)�user_specified_encoding�warnings�warnr �warn_if_markup_looks_like_xml)�self�markupr �document_declared_encoding�exclude_encodingss �@/usr/local/lib/python3.12/site-packages/bs4/builder/_html5lib.py�prepare_markupzHTML5TreeBuilder.prepare_markup@ sM � �� � (?��$�
��M�M�|��
� �<�<��q�
� �t�T�5�)�)�s �AAc �B � | j j �t j dd�� t j
| j �� }|| j _ t � }t |t � s%t r| j |d<