
    gu                         S SK r SSKJr  SSKJrJr  SSKJr  \ R                  " S\ R                  5      r
\ R                  " S\ R                  5      rS	\S
\4S jrg)    N   )entities)fromCodePointisValidEntityCode   )StateInlinez#^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));z^&([a-z][a-z0-9]{1,31});statesilentc                    U R                   nU R                  nU R                  U   S:w  a  gUS-   U:  Ga  U R                  US-      nUS:X  a  [        R	                  U R
                  US  5      nU(       a  U(       d|  UR                  S5      nUS   R                  5       S:X  a  [        USS  S5      O[        US5      nU =R                  [        U5      (       a  [        U5      O
[        S	5      -  sl	        U =R                   [        UR                  S5      5      -  sl         g
O[        R	                  U R
                  US  5      nU(       ay  UR                  S5      [        ;   a`  U(       d+  U =R                  [        UR                  S5         -  sl	        U =R                   [        UR                  S5      5      -  sl         g
U(       d  U =R                  S-  sl	        U =R                   S-  sl         g
)N&   Fr   #   r   x   
   i  T&)posposMaxsrcCharCode
DIGITAL_REsearchsrcgrouplowerintpendingr   r   lenNAMED_REr   )r	   r
   r   maximumchmatchmatch1codes           ?lib/python3.13/site-packages/markdown_it/rules_inline/entity.pyentityr$      s   
))CllG%a7sQw':%%eiio6E"[[^F "!9??,3 F12J+ _ 
 MM,T22 &d+*62M 		SQ00	 $ OOEIIcdO4E;;q>X-!%++a.)AAIIU[[^!44I	IINI    )recommon.entitiesr   common.utilsr   r   state_inliner   compile
IGNORECASEr   r   boolr$    r%   r#   <module>r.      sN    	 & ; %ZZ>N
::12==A)+ )t )r%   