%PDF- %PDF-
| Direktori : /lib/python3/dist-packages/markdown/__pycache__/ |
| Current File : //lib/python3/dist-packages/markdown/__pycache__/inlinepatterns.cpython-312.pyc |
�
���ep� � � � d Z ddlmZ ddlmZ ddlmZmZmZm Z ddl
Z
ddlmc m
Z ddlmZ erddlmZ dPd �Zd
Z dZ dZ d
Z dZ dZ dZ dZ dZ dZ dZ dZ dZ edz Z dZ! e Z" e!Z# dZ$ dZ% dZ& dZ' dZ( dZ) dQd�Z* G d � d!e � Z+ G d"� d#� Z, G d$� d%e,� Z- G d&� d'e,� Z. G d(� d)e-� Z/ G d*� d+e-� Z0 G d,� d-e,� Z1 G d.� d/e-� Z2 G d0� d1e1� Z3 G d2� d3e2� Z4 G d4� d5e-� Z5 G d6� d7e1� Z6 G d8� d9e2� Z7 G d:� d;e-� Z8 G d<� d=e-� Z9 G d>� d?e9� Z: G d@� dAe-� Z; G dB� dCe;� Z< G dD� dEe;� Z= G dF� dGe=� Z> G dH� dIe=� Z? G dJ� dKe?� Z@ G dL� dMe-� ZA G dN� dOe-� ZBy)RaB
In version 3.0, a new, more flexible inline processor was added, [`markdown.inlinepatterns.InlineProcessor`][]. The
original inline patterns, which inherit from [`markdown.inlinepatterns.Pattern`][] or one of its children are still
supported, though users are encouraged to migrate.
The new `InlineProcessor` provides two major enhancements to `Patterns`:
1. Inline Processors no longer need to match the entire block, so regular expressions no longer need to start with
`r'^(.*?)'` and end with `r'(.*?)%'`. This runs faster. The returned [`Match`][re.Match] object will only contain
what is explicitly matched in the pattern, and extension pattern groups now start with `m.group(1)`.
2. The `handleMatch` method now takes an additional input called `data`, which is the entire block under analysis,
not just what is matched with the specified pattern. The method now returns the element *and* the indexes relative
to `data` that the return element is replacing (usually `m.start(0)` and `m.end(0)`). If the boundaries are
returned as `None`, it is assumed that the match did not take place, and nothing will be altered in `data`.
This allows handling of more complex constructs than regular expressions can handle, e.g., matching nested
brackets, and explicit control of the span "consumed" by the processor.
� )�annotations� )�util)�
TYPE_CHECKING�Any�
Collection�
NamedTupleN)�entities)�Markdownc �6 � t j � }|j t t � dd� |j t t | � dd� |j t t | � dd� |j t t | � dd� |j t t | � d d
� |j t t | � dd� |j t t | � d
d� |j t! t | � dd� |j t# t$ | � dd� |j t'