
    F j                        S SK Jr  S SKJr  S SKrSSKJr  \R                  " \5      r	SSSS	S
S.           SS jjr
\
" 5       rg)    )annotations)CallableN   )
StateBlock)~`fenceF)r      )markers
token_typeexact_matchdisallow_marker_in_infomin_markersc                X   ^ ^^^^ U(       a  S mOS m          SUUU UU4S jjnU$ )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                
    X:H  $ N opening_lenclosing_lens     n/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/markdown_it/rules_block/fence.py<lambda>!make_fence_rule.<locals>.<lambda>(       ;;U    c                
    X:  $ r   r   r   s     r   r   r   +   r   r   c                4  > [         R                  SXX#5        SnU R                  U   U R                  U   -   nU R                  U   nU R                  U5      (       a  gUT-   U:  a  gU R                  U   nUT;  a  gUnU R                  XW5      nXX-
  n	U	T:  a  gU R                  X n
U R                  XV nUT;   a  X{;   a  gU(       a  gUn US-  nX:  a  OU R                  U   U R                  U   -   =pXU R                  U   nXV:  a  U R                  U   U R                  :  a  Om U R                  U   U:w  a  Mt   U R                  U5      (       a  M  U R                  XW5      nT" XU-
  5      (       d  M  U R                  U5      nXV:  a  M  Sn U R                  U   n	X(       a  SOS-   U l        U R                  TSS5      nXl        U R                  US-   XS5      Ul        Xl        XR                  /Ul        g! [         a     M{  f = f)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lengthr0   paramsnextLinetokenclosing_matcherr   r   r   r   s                 r   _fence_rule$make_fence_rule.<locals>._fence_rule-   s=    	,e	
 ll9%Y(??,,y)y))w&3    -K3#3',,1A  MH" X.h1GGGCll8,G}h!7%//!I 99S>V+ ,
 ""8,,$$S1C"6955 ""3'C} M i(m;


:vq1
y1}hM

+	A  s   /H	 	
HH)
r2   r   r3   intr4   rB   r5   boolreturnrC   r   )r   r   r   r   r   r@   r?   s   `` `` @r   make_fence_rulerE      sW    4 U V__&)_47_AE_	_ _B r   )r   tuple[str, ...]r   strr   rC   r   rF   r   rB   rD   z,Callable[[StateBlock, int, int, bool], bool])
__future__r   collections.abcr   loggingstate_blockr   	getLogger__name__r   rE   r	   r   r   r   <module>rN      s    " $  #			8	$
  */5BB B 	B
 -B B 2BL 	r   