
    c.                         d Z ddlmZ ddlmZmZmZmZ ddlZdZ	dZ
d	Z G d
 de          Z G d de          Zd ZdS )a  
Legacy Em Extension for Python-Markdown
=======================================

This extension provides legacy behavior for _connected_words_.

Copyright 2015-2018 The Python Markdown Project

License: [BSD](https://opensource.org/licenses/bsd-license.php)

   )	Extension   )UnderscoreProcessorEmStrongItemEM_STRONG2_RESTRONG_EM2_RE    Nz(_)([^_]+)\1z(_{2})(.+?)\1z%(_)\1(?!\1)([^_]+?)\1(?!\1)(.+?)\1{3}c                      e Zd ZdZ e ej        eej        ej	        z            dd           e ej        e
ej        ej	        z            dd           e ej        eej        ej	        z            dd           e ej        eej        ej	        z            dd           e ej        eej        ej	        z            dd          gZd	S )
LegacyUnderscoreProcessorzIEmphasis processor for handling strong and em matches inside underscores.doublez	strong,emz	em,strongdouble2singlestrongemN)__name__
__module____qualname____doc__r   recompiler   DOTALLUNICODEr   STRONG_EM_RE	STRONG_REEMPHASIS_REPATTERNS     =lib/python3.11/site-packages/markdown/extensions/legacy_em.pyr   r      s        SS 	ZRZry2:/EFFR]^^ZRZry2:/EFFR]^^ZRZbi"*.DEEyR]^^ZRZ	29rz+ABBHhWWZRZRY-CDDhPTUUHHHr   r   c                       e Zd ZdZd ZdS )LegacyEmExtensionz+ Add legacy_em extension to Markdown class.c                 X    |j                             t          d          dd           dS )z Modify inline patterns. _
em_strong22   N)inlinePatternsregisterr   )selfmds     r   extendMarkdownz LegacyEmExtension.extendMarkdown*   s-    
""#<T#B#BLRTUUUUUr   N)r   r   r   r   r*   r   r   r   r!   r!   '   s.        55V V V V Vr   r!   c                      t          di | S )z- Return an instance of the LegacyEmExtension r   )r!   )kwargss    r   makeExtensionr-   /   s    &&v&&&r   )r    r   inlinepatternsr   r   r   r   r   r   r   r   r   r!   r-   r   r   r   <module>r0      s   
 
       \ \ \ \ \ \ \ \ \ \ \ \ 				  	 8	 	 	 	 	 3 	 	 	V V V V V	 V V V' ' ' ' 'r   