Uname : Linux premium36.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Soft : LiteSpeed
Ip : 198.54.115.237
Port : 443
~
/
opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
lxml
/
html
/
__pycache__
[ HOME ]
Exec
Submit
File Name : diff.cpython-312.pyc
� ���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 "