Ë
    çÍ:j°  ã                  óŽ   — d dl mZ d dlmZ d dlZddlmZ  ej                  e«      Z	dddd	d
dœ	 	 	 	 	 	 	 	 	 	 	 dd„Z
 e
«       Zy)é    )Úannotations)ÚCallableNé   )Ú
StateBlock)ú~ú`ÚfenceF)r   é   )ÚmarkersÚ
token_typeÚexact_matchÚdisallow_marker_in_infoÚmin_markersc                óJ   ‡ ‡‡‡‡— |rd„ Šnd„ Š	 	 	 	 	 	 	 	 	 	 dˆˆˆ ˆˆfd„}|S )a  Create a fence parsing rule with configurable options.

    :param markers: Tuple of single characters that can be used as fence markers.
    :param token_type: The token type name to emit (e.g. "fence", "colon_fence").
    :param exact_match: If True, the closing fence must have exactly the same
        number of marker characters as the opening fence (not "at least as many").
        This enables nesting of fences with different marker counts.
    :param disallow_marker_in_info: Tuple of marker characters that are not allowed
        to appear in the info string. The check only applies when the actual opening
        marker is in this tuple (e.g. a tilde fence is unaffected by ``"`"`` being
        listed). Per CommonMark, backtick fences cannot have backticks in the info
        string. Use ``()`` to disable this restriction.
    :param min_markers: Minimum number of marker characters to form a fence.
    :return: A block rule function with signature
        ``(state, startLine, endLine, silent) -> bool``.
    c                ó   — || k(  S ©N© ©Úopening_lenÚclosing_lens     úr/home/mcse/projects/srt_converter/srt-converter-venv/lib/python3.12/site-packages/markdown_it/rules_block/fence.pyú<lambda>z!make_fence_rule.<locals>.<lambda>(   ó   € ¸;È+Ñ;U€ ó    c                ó   — || k\  S r   r   r   s     r   r   z!make_fence_rule.<locals>.<lambda>+   r   r   c                ó   •— t         j                  d| |||«       d}| j                  |   | j                  |   z   }| j                  |   }| j                  |«      ry|‰z   |kD  ry| j                  |   }|‰vry|}| j                  ||«      }||z
  }	|	‰k  ry| j                  || }
| j                  || }|‰v r||v ry|ry|}	 |dz  }||k\  rn²| j                  |   | j                  |   z   x}}| j                  |   }||k  r| j                  |   | j                  k  rn`	 | j                  |   |k7  rŒr	 | j                  |«      rŒ…| j                  ||«      } ‰|	||z
  «      sŒ¤| j                  |«      }||k  rŒ»d}	 | j                  |   }	||rdndz   | _        | j                  ‰dd«      }||_        | j                  |dz   ||	d«      |_        |
|_        || j                  g|_        y# t        $ r Y Œyw xY w)Nzentering fence: %s, %s, %s, %sFTr   r   Úcode)ÚLOGGERÚdebugÚbMarksÚtShiftÚeMarksÚis_code_blockÚsrcÚskipCharsStrÚsCountÚ	blkIndentÚ
IndexErrorÚ
skipSpacesÚlineÚpushÚinfoÚgetLinesÚcontentÚmarkupÚmap)ÚstateÚ	startLineÚendLineÚsilentÚhaveEndMarkerÚposÚmaximumÚmarkerÚmemÚlengthr/   ÚparamsÚnextLineÚtokenÚclosing_matcherr   r   r   r   s                 €€€€€r   Ú_fence_rulez$make_fence_rule.<locals>._fence_rule-   sV  ø€ ô 	�‰Ø,¨e°YÀÈô	
ð ˆØ�l‰l˜9Ñ%¨¯©°YÑ(?Ñ?ˆØ—,‘,˜yÑ)ˆà×Ñ˜yÔ)Øà�Ñ˜wÒ&Øà—‘˜3‘ˆà˜Ñ Øð ˆØ× Ñ   fÓ-ˆà�s‘ˆà�KÒØà—‘˜3˜sÐ#ˆØ—‘˜3˜wÐ'ˆàÐ,Ñ,°¸6Ñ1AØñ Øð ˆàØ˜‰MˆHØ˜7Ò"ð àŸ™ XÑ.°·±¸hÑ1GÑGÐGˆC�#Ø—l‘l 8Ñ,ˆGà�WŠ} §¡¨hÑ!7¸%¿/¹/Ò!Ið ðØ—9‘9˜S‘> VÒ+Øð ,ð
 ×"Ñ" 8Ô,Øà×$Ñ$ S¨&Ó1ˆCá" 6¨3°©9Ô5Øð ×"Ñ" 3Ó'ˆCà�WŠ}Øà ˆMàð —‘˜iÑ(ˆà¡m¡¸Ñ;ˆŒ
à—
‘
˜: v¨qÓ1ˆØˆŒ
ØŸ™ y°1¡}°hÀÈÓMˆŒØˆŒØ §
¡
Ð+ˆŒ	àøôA ò Ùðús   Ä$G1 Ç1	G=Ç<G=)
r1   r   r2   Úintr3   r@   r4   ÚboolÚreturnrA   r   )r   r   r   r   r   r?   r>   s   `` `` @r   Úmake_fence_rulerC      sW   ü€ ñ4 áU‰ñ Vˆð_Øð_Ø&)ð_Ø47ð_ØAEð_à	÷_ñ _ðB Ðr   )r   útuple[str, ...]r   Ústrr   rA   r   rD   r   r@   rB   z,Callable[[StateBlock, int, int, bool], bool])Ú
__future__r   Úcollections.abcr   ÚloggingÚstate_blockr   Ú	getLoggerÚ__name__r   rC   r	   r   r   r   ú<module>rL      s…   ðå "å $Û å #à	ˆ×	Ñ	˜8Ó	$€ð
  *ØØØ/5ØñBàðBð ðBð ð	Bð
 -ðBð ðBð 2óBñL 	Ó�r   