%PDF- %PDF-
| Direktori : /lib/python3/dist-packages/markdown/extensions/__pycache__/ |
| Current File : //lib/python3/dist-packages/markdown/extensions/__pycache__/smarty.cpython-312.pyc |
�
���e(+ �
�J � d Z ddlmZ ddlmZ ddlmZmZ ddlm Z ddl
mZ dd lm
Z
mZ e
rdd
lmZ ddlmZ ddlZddlmc mZ d
ZdZdZdZdddddddddd� Zdez Zdez ZdZdZdZd ez Zd!Z d"ez Z!d#ez Z"d$ez Z#d%Z$d&Z%d'Z&ed(z Z' G d)� d*e� Z( G d+� d,e� Z)d-� Z*y).z�
Adds conversion of ASCII dashes, quotes and ellipses to their HTML
entity equivalents.
See the [documentation](https://Python-Markdown.github.io/extensions/smarty)
for details.
� )�annotations� )� Extension� )�HtmlInlineProcessor�HTML_RE)�InlineProcessor)�Registry)�
TYPE_CHECKING�Sequence)�Markdown)�inlinepatternsNz)[!"#\$\%'()*+,-.\/:;<=>?\@\[\\\]\^_`{|}~]z[\s.,;:!?)]z[^\ \t\r\n\[\{\(\-\u0002\u0003]u1 (\s| |--|–|—|&[mn]dash;|–|—)z—z–z…z«z»z‘z’z“z”) �mdash�ndash�ellipsis�left-angle-quote�right-angle-quote�left-single-quote�right-single-quote�left-double-quote�right-double-quotez
^'(?=%s\B)z
^"(?=%s\B)z"'(?=\w)z'"(?=\w)z(?<!\w)'(?=\d{2}s)z %s"(?=\w)z"(?=\s)z(?<=%s)"z %s'(?=\w)z(?<=%s)'(?!\s|s\b|\d)z '(\s|s\b)�'�"z(?!\>)c � � e Zd Zdd�Zdd�Zy)�SubstituteTextPatternc �L � t j | |� || _ || _ y)z" Replaces matches with some text. N)r �__init__�replace�md)�self�patternr r s �</usr/lib/python3/dist-packages/markdown/extensions/smarty.pyr zSubstituteTextPattern.__init__� s � ��$�$�T�7�3������� c � � d}| j D ]O }t |t � r||j |� z
}�(|| j j
j
|� z
}�Q ||j d� |j d� fS )N� r ) r �
isinstance�int�groupr � htmlStash�store�start�end)r �m�data�result�parts r"