opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
lxml
/
html
/
__pycache__
/
Go to Home Directory
+
Upload
Create File
root@0UT1S:~$
Execute
By Order of Mr.0UT1S
[DIR] ..
N/A
ElementSoup.cpython-312.pyc
597 bytes
Rename
Delete
__init__.cpython-312.pyc
78.73 KB
Rename
Delete
_diffcommand.cpython-312.pyc
3.77 KB
Rename
Delete
_html5builder.cpython-312.pyc
5.66 KB
Rename
Delete
_setmixin.cpython-312.pyc
2.44 KB
Rename
Delete
builder.cpython-312.pyc
5.22 KB
Rename
Delete
clean.cpython-312.pyc
601 bytes
Rename
Delete
defs.cpython-312.pyc
3.25 KB
Rename
Delete
diff.cpython-312.pyc
33.40 KB
Rename
Delete
formfill.cpython-312.pyc
11.85 KB
Rename
Delete
html5parser.cpython-312.pyc
8.76 KB
Rename
Delete
soupparser.cpython-312.pyc
11.29 KB
Rename
Delete
usedoctest.cpython-312.pyc
485 bytes
Rename
Delete
� ��g�v � � � d dl Z d dlmZ d dlmZ d dlZddgZ d dlmZ eZ e d� Zefd�Zd � Zd � Zd� Zd� Zd � Zd� Zd� Zd� ZdDd�Zd� Z G d� d� Z G d� d� Z G d� de� Z d� Z!d� Z"d� Z#d� Z$d� Z%d� Z& G d� d e � Z' G d!� d"e'� Z( G d#� d$e'� Z)dEd%�Z*dEd&�Z+ ejX d'ejZ ej\ z � Z/ ejX d(ejZ ej\ z � Z0 ejX d)ejZ ej\ z � Z1d*� Z2 ejX d+� Z3d,� Z4d-� Z5d.Z6d/Z7d0Z8dDd1�Z9 ejX d2ejt � Z;d3� Z< ejX d4� Z=d5� Z>d6� Z?d7� Z@d8� ZAd9� ZBd:� ZCdDd;�ZDd<� ZEd=� ZFd>� ZGd?� ZH G d@� dAe j� � ZJeKdBk( rd dClmLZL eLj� � yy# e $ r d dlmZ Y ���w xY w# e$ r eZ Y ���w xY w# e$ r eZY ���w xY w)F� N)�etree)�fragment_fromstring� html_annotate�htmldiff)�escapec �: � dt t |� d� �d| �d�S )Nz <span title="� z">z</span>)�html_escape�_unicode)�text�versions �?/opt/hc_python/lib64/python3.12/site-packages/lxml/html/diff.py�default_markupr s � ��H�W�%�q�)�4�1� 1� c �� � | D ��cg c] \ }}t ||� �� }}}|d }|dd D ] }t ||� |}� t |� }t ||� }dj |� j � S c c}}w )a doclist should be ordered from oldest to newest, like:: >>> version1 = 'Hello World' >>> version2 = 'Goodbye World' >>> print(html_annotate([(version1, 'version 1'), ... (version2, 'version 2')])) <span title="version 2">Goodbye</span> <span title="version 1">World</span> The documents must be *fragments* (str/UTF8 or unicode), not complete documents The markup argument is a function to markup the spans of words. This function is called like markup('Hello', 'version 2'), and returns HTML. The first argument is text and never includes any markup. The default uses a span with a title: >>> print(default_markup('Some Text', 'by Joe')) <span title="by Joe">Some Text</span> r r N� )�tokenize_annotated�html_annotate_merge_annotations�compress_tokens�markup_serialize_tokens�join�strip)�doclist�markup�docr � tokenlist� cur_tokens�tokens�results r r r "