
    )i                     l    S r SSKrSSKJr  SSKJr  SSKJr  SSKJ	r	  Sr
SrS	rS
r " S S\5      rS rg)z
pygments.sphinxext
~~~~~~~~~~~~~~~~~~

Sphinx extension to generate automatic documentation of lexers,
formatters and filters.

:copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
    N)nodes)ViewList)	Directive)nested_parse_with_titlesz
.. module:: %s

%s
%s
z`
.. class:: %s

    :Short names: %s
    :Filenames:   %s
    :MIME types:  %s

    %s

    %s

zA
.. class:: %s

    :Short names: %s
    :Filenames: %s

    %s

z'
.. class:: %s

    :Name: %s

    %s

c                   J    \ rS rSrSrSrSrSrSr0 r	S r
S rS rS	 rS
 rSrg)PygmentsDoc<   zb
A directive to collect all lexers/formatters/filters and generate
autoclass directives for them.
F   r   c                    [        5       U l        U R                  S   S:X  a  U R                  5       nOwU R                  S   S:X  a  U R	                  5       nOSU R                  S   S:X  a  U R                  5       nO/U R                  S   S:X  a  U R                  5       nO[        S5      e[        R                  " 5       n[        UR                  S5      SS	9n[        U R                  X25        U R                   H<  nU R                  R                  R                  R                   R#                  U5        M>     UR$                  $ )
Nr   lexers
formattersfilterslexers_overviewz,invalid argument for "pygmentsdoc" directive
 )source)set	filenames	argumentsdocument_lexersdocument_formattersdocument_filtersdocument_lexers_overview	Exceptionr   compoundr   splitr   statedocumentsettingsrecord_dependenciesaddchildren)selfoutnodevlfns        R/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/pygments/sphinxext.pyrunPygmentsDoc.runG   s    >>!(&&(C^^A,.**,C^^A)+'')C^^A"33//1CJKK~~ciiob1 R6..BJJ((<<@@D !}}    c                   ^^ SSK Jn  SSKn/ n/ nS n[        UR	                  5       S S9 H  u  pgUR
                  R                  US   5      nUR                  UR                  -   n	UR                  U" US   UR                  5      SR                  U	5      R                  S	S
5      R                  SS5      =(       d    SSR                  US   5      US    SU 3S.5        M     / SQn
U
 VVs/ s H5  n[        U Vs/ s H  oU   (       d  M  [        X   5      PM     sn5      PM7     snnmU4S jmUU4S jnUR                  U" 5       5        UR                  T" SSSS5      5        UR                  U" 5       5        U H-  nUR                  T" US   US   US   SUS    S35      5        M/     UR                  U" 5       5        SR                  U5      $ s  snf s  snnf )zGenerate a tabular overview of all lexers.

The columns are the lexer name, the extensions handled by this lexer
(or "None"), the aliases and a link to the lexer class.r   LEXERSNc                 &    U(       a	  SU  SU S3$ U $ )N`z <z>`_ )nameurls     r(   format_link9PygmentsDoc.document_lexers_overview.<locals>.format_linke   s    4&3%s++Kr+   c                 .    U S   S   R                  5       $ )Nr
   )lowerxs    r(   <lambda>6PygmentsDoc.document_lexers_overview.<locals>.<lambda>j   s    AaDGMMOr+   keyr
   , *\*_\None   .)r2   
extensionsaliasesclassc                     > / n[        TU 5       HB  u  p#U(       a"  UR                  UR                  U5      5        M.  UR                  SU-  5        MD     SR                  U5      $ )zFormat a table row )zipappendljustjoin)columnsr$   lengthcolcolumn_lengthss       r(   	write_row7PygmentsDoc.document_lexers_overview.<locals>.write_rowy   sS    C">7;JJsyy01JJs6z*	  < 88C= r+   c                  B   > T V s/ s H  n SU -  PM
     nn T" U6 $ s  sn f )zWrite a table separator row=r1   )cseprR   rS   s     r(   write_seperator=PygmentsDoc.document_lexers_overview.<locals>.write_seperator   s*    "01.Q3q5.C1c?" 2s   NamezExtension(s)zShort name(s)zLexer classr2   rF   rG   z	:class:`~rH   r0   r   )pygments.lexers._mappingr.   pygments.lexerssorteditemsr   find_lexer_classr   alias_filenamesrL   r3   rN   replacemaxlen)r#   r.   pygmentsr$   tabler4   	classnamedata	lexer_clsrF   column_namescolumnrowrY   rR   rS   s                 @@r(   r   $PygmentsDoc.document_lexers_overviewZ   s   
 	4	
  &flln:STOI 88aAI",,y/H/HHJLL#DGY]];"ii
3;;CGOOPSUYZd^d99T!W- G9Ai[1	 	  U B(46(4f 5P5CK/s3;/5PQ(46		!	#
 	

?$%

9V^_mTU

?$%CJJyFL!ICL>+	- .  	

?$%yy~= Q 6s   2G$GG#G$G$c           
         SSK Jn  SS KnSS KnSS Kn/ n0 n0 n[        UR                  5       S S9 GHM  u  pU	S   n
[        U
S S U/5      nU R                  R                  UR                  5        [        X5      nUR                  (       d  [        SU S35        UR                  n[        U[        5      (       a  UR!                  S5      n[        USS 5      nU(       a  UR#                  UR%                  U5      5      R&                  R&                  S	-  S
-  U-  nUR)                  SS9nU(       d  [+        SU SU 35      eU	S   (       a6  U	S   S   nUS-  nUSU S3-  nUR-                  5        H  nUSU S3-  nM     UR.                  (       a  SUR.                   3nOSnUR1                  U
/ 5      R3                  USR5                  U	S   5      =(       d    SSR5                  U	S   5      R7                  SS5      R7                  SS5      =(       d    SSR5                  U	S   5      =(       d    SUU45        X;  d  GM  UR                  n[        U[        5      (       a  UR!                  S5      nUXz'   GMP     [        UR                  5       S S9 H  u  n
nXz   c  [+        S U
 35      eXz   R-                  5       S   R9                  5       R;                  S!5      nUR3                  [<        U
US"[?        U5      -  4-  5        U H  n	UR3                  [@        U	-  5        M     M     SR5                  U5      $ )#Nr   r-   c                     U S   $ Nr   r1   r8   s    r(   r:   -PygmentsDoc.document_lexers.<locals>.<lambda>       AaDr+   r<   z	Warning: z does not have a docstring.utf8_exampletestsexamplefileszutf-8)encodingzEmpty example file 'z' for lexer rD   z

    .. admonition:: Example
z
      .. code-block:: z

z
          r   z.. versionadded:: r   r>   rC      r?   r@   rA   rB      c                     U S   $ rp   r1   r8   s    r(   r:   rq      rr   r+   zMissing docstring for rE   -)!r\   r.   re   inspectpathlibr^   r_   
__import__r   r!   __file__getattr__doc__print
isinstancebytesdecodePath
getabsfileparent	read_textr   
splitlinesversion_added
setdefaultrL   rN   rb   striprstrip	MODULEDOCrd   LEXERDOC)r#   r.   re   r|   r}   r$   modulesmoduledocstringsrg   rh   modulemodcls	docstringexample_filepcontent
lexer_namelineversion_linemoddocr   headings                          r(   r   PygmentsDoc.document_lexers   s   3%flln.IOI!WFVT4)=CNNs||,#)C;;	),GHII)U++%,,V4	"3
D9LLL!3!3H!=>EELL,-/;<++w+7#.|nL$+'( ( 7!%aJ!DDI#;J<t!LLI ' 2 2 4!z$r%::	 !5   !3C4E4E3FG!vr*11		$q'",f		$q'"**36>>sDISV		$q'",f3  -fe,,#]]62F+1 (Y  J\ %W]]_.INFF'/"8 ABB&.99;A>DDFMMcRGJJyFGSW5E#FFG

8d?+  J wws|r+   c           
      @   SSK Jn  / n[        UR                  5       S S9 H  u  p4US   n[	        US S U/5      nU R
                  R                  UR                  5        [        Xc5      nUR                  n[        U[        5      (       a  UR                  S5      nUR                  n	UR                  [        U	SR!                  US   5      =(       d    SSR!                  US	   5      R#                  S
S5      =(       d    SU4-  5        M     SR!                  U5      $ )Nr   )
FORMATTERSc                     U S   $ rp   r1   r8   s    r(   r:   1PygmentsDoc.document_formatters.<locals>.<lambda>   s    !r+   r<   rs   r>   rD   rC   rx   r?   r@   r   )pygments.formattersr   r^   r_   r~   r   r!   r   r   r   r   r   r   __name__rL   FMTERDOCrN   rb   )
r#   r   r$   rg   rh   r   r   r   r   r   s
             r(   r   PygmentsDoc.document_formatters   s    2%j&6&6&8nMOI!WFVT4)=CNNs||,#)CI)U++%,,V4	llGJJx7DIId1g,>,H&#'99T!W#5#=#=c5#I#SV#,#. . /  N wws|r+   c                    SSK Jn  / nUR                  5        H  u  p4U R                  R	                  [
        R                  UR                     R                  5        UR                  n[        U[        5      (       a  UR                  S5      nUR                  [        UR                  X54-  5        M     SR!                  U5      $ )Nr   )FILTERSrs   r   )pygments.filtersr   r_   r   r!   sysr   
__module__r   r   r   r   r   rL   	FILTERDOCr   rN   )r#   r   r$   r2   r   r   s         r(   r   PygmentsDoc.document_filters   s    , IDNNs{{3>>:CCDI)U++%,,V4	JJyCLL$#BBC ) wws|r+   )r   N)r   r   __qualname____firstlineno__r   has_contentrequired_argumentsoptional_argumentsfinal_argument_whitespaceoption_specr)   r   r   r   r   __static_attributes__r1   r+   r(   r   r   <   s@     K %K&:x?B$
r+   r   c                 0    U R                  S[        5        g )Npygmentsdoc)add_directiver   )apps    r(   setupr      s    m[1r+   )r   r   docutilsr   docutils.statemachiner   docutils.parsers.rstr   sphinx.util.nodesr   r   r   r   r   r   r   r1   r+   r(   <module>r      sK   	   * * 6		w) wt2r+   