HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/pygments/__pycache__/sphinxext.cpython-38.pyc
U

�[1�@stdZddlmZddlZddlmZddlmZddlm	Z	ddl
mZdZd	Z
d
ZdZGdd
�d
e	�Zdd�ZdS)a
    pygments.sphinxext
    ~~~~~~~~~~~~~~~~~~

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

    :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�print_functionN)�nodes)�ViewList)�	Directive)�nested_parse_with_titlesz
.. module:: %s

%s
%s
zX
.. class:: %s

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

    %s

zA
.. class:: %s

    :Short names: %s
    :Filenames: %s

    %s

z'
.. class:: %s

    :Name: %s

    %s

c@sDeZdZdZdZdZdZdZiZdd�Z	dd�Z
d	d
�Zdd�Zd
S)�PygmentsDoczn
    A directive to collect all lexers/formatters/filters and generate
    autoclass directives for them.
    F�rcCs�t�|_|jddkr |��}n8|jddkr8|��}n |jddkrP|��}ntd��t��}t	|�
d�dd�}t|j||�|jD]}|jj
jj�|�q�|jS)	Nr�lexersZ
formatters�filtersz,invalid argument for "pygmentsdoc" directive�
�)�source)�set�	filenamesZ	arguments�document_lexers�document_formatters�document_filters�	ExceptionrZcompoundr�splitr�stateZdocumentZsettingsZrecord_dependencies�addZchildren)�self�outZnodeZvl�fn�r�4/usr/lib/python3/dist-packages/pygments/sphinxext.py�runHs



zPygmentsDoc.runc
Cs�ddlm}g}i}i}t|��dd�d�D]�\}}|d}t|dd|g�}|j�|j�t||�}	|	j	svt
d|�|	j	}
t|
t�r�|
�
d�}
|�|g��|d�|d	�p�d
d�|d��dd
��dd�p�d
d�|d�p�d
|
f�||kr,|j	}t|t��r
|�
d�}|||<q,t|��dd�d�D]v\}}||dk�rLtd|f��||��d���d�}
|�t||
dt|
�f�|D]}|�t|��q��q(d�|�S)Nr)�LEXERScSs|dS�Nrr��xrrr�<lambda>^�z-PygmentsDoc.document_lexers.<locals>.<lambda>��keyz&Warning: %s does not have a docstring.�utf8�, ��None��*�\*�_�\�cSs|dSrrrrrrr!tr"zMissing docstring for %s�.�-r)Zpygments.lexers._mappingr�sorted�items�
__import__rr�__file__�getattr�__doc__�print�
isinstance�bytes�decode�
setdefault�append�join�replacer�
splitlines�strip�rstrip�	MODULEDOC�len�LEXERDOC)rrr�modulesZmoduledocstrings�	classname�data�module�mod�cls�	docstringZmoddocr	�headingrrrrYsD


 �

zPygmentsDoc.document_lexersc

Cs�ddlm}g}t|��dd�d�D]�\}}|d}t|dd|g�}|j�|j�t||�}|j	}t
|t�rv|�d�}|j
}	|�t|	d�|d�p�d	d�|d
��dd�p�d	|f�q$d
�|�S)Nr)�
FORMATTERScSs|dSrrrrrrr!�r"z1PygmentsDoc.document_formatters.<locals>.<lambda>r#r%r&r'r(r)r*r+r)Zpygments.formattersrMr1r2r3rrr4r5r6r8r9r:�__name__r<�FMTERDOCr=r>)
rrMrrFrGrHrIrJrKrLrrrr~s 


�
zPygmentsDoc.document_formatterscCsrddlm}g}|��D]N\}}|j�tj|jj�|j	}t
|t�rP|�d�}|�
t|j||f�qd�|�S)Nr)�FILTERSr%r)Zpygments.filtersrPr2rr�sysrE�
__module__r4r6r8r9r:r<�	FILTERDOCrNr=)rrPr�namerJrKrrrr�s

zPygmentsDoc.document_filtersN)
rNrR�__qualname__r6Zhas_contentZrequired_argumentsZoptional_argumentsZfinal_argument_whitespaceZoption_specrrrrrrrrr=s%rcCs|�dt�dS)NZpygmentsdoc)Z
add_directiver)Zapprrr�setup�srV)r6Z
__future__rrQZdocutilsrZdocutils.statemachinerZdocutils.parsers.rstrZsphinx.util.nodesrrBrDrOrSrrVrrrr�<module>s

`