HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/docutils/parsers/rst/directives/__pycache__/body.cpython-310.pyc
o

�-$`^&�@s0dZdZddlmZddlmZddlmZddlmZddl	m
Z
mZmZGdd	�d	e�Z
Gd
d�de
�ZGdd
�d
e
�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGd d!�d!e�ZGd"d#�d#e�Zd$S)%zb
Directives for additional body elements.

See `docutils.parsers.rst.directives` for API details.
�reStructuredText�)�nodes)�	Directive)�
directives)�set_classes)�Lexer�
LexerError�NumberLinesc@s8eZdZdZdZdZejejd�Z	dZ
dZ	dd�ZdS)�BasePseudoSection�rT��class�nameNcCs&|jjst|jjtj�s|�d|j��|��|j	r]|j	d}|j
�||j�\}}tj
|dg|�R�g}d|jvr\|j
�|jd|j�\}}|�tj|jddg|�R��|�|�ng}g}d�|j�}|j|g||�R�}|d|j�dg�7<|�|�|r�|j
�|j|j|�|gS)NzBThe "%s" directive may not be used within topics or body elements.r��subtitle�
�classesr
)�
state_machine�match_titles�
isinstance�noder�sidebar�errorr�assert_has_content�	arguments�state�inline_text�lineno�title�options�appendr�extend�join�content�
node_class�get�add_name�nested_parse�content_offset)�self�
title_text�	textnodes�messages�titles�
more_messages�textr�r0�F/usr/lib/python3/dist-packages/docutils/parsers/rst/directives/body.py�run!s:��

�
�
�
zBasePseudoSection.run)
�__name__�
__module__�__qualname__�required_arguments�optional_arguments�final_argument_whitespacer�class_option�	unchanged�option_spec�has_contentr$r2r0r0r0r1r
s�r
c@seZdZejZdS)�TopicN)r3r4r5r�topicr$r0r0r0r1r=>�
r=c@s6eZdZejZdZdZej	�
�Z	eje	d<dd�Z
dS)�SidebarrrrcCsDt|jjtj�r|�d|j��d|jvr|js|�d��t	�
|�S)Nz<The "%s" directive may not be used within a sidebar element.rz6The "subtitle" option may not be used without a title.)rrrrrrrrrr
r2)r)r0r0r1r2Ls�

zSidebar.runN)r3r4r5rrr$r6r7r
r;�copyr�unchanged_requiredr2r0r0r0r1r@Cs

r@c@�&eZdZejejd�ZdZdd�ZdS)�	LineBlockrTcCs�|��tj|j�dg�d�}|�|�|g}|jD]:}|j�|�	�|j
|j�\}}tj|dg|�R�}|�	�rDt
|�t
|���|_||7}|�|�|jd7_q|j�|�|S)Nr
�rrr)rr�
line_blockrr%r&r#rr�striprr(�line�len�lstrip�indentr!�nest_line_block_lines)r)�block�	node_list�	line_text�
text_nodesr,rHr0r0r1r2]s 

�
z
LineBlock.runN�	r3r4r5rr9r:r;r<r2r0r0r0r1rDW��rDc@rC)�
ParsedLiteralrTcCsnt|j�|��d�|j�}|j�||j�\}}tj	|dg|�Ri|j��}|j
d|_|�|�|g|S)Nrrr)
rrrr"r#rrrr�
literal_blockr(rHr&)r)r/rPr,rr0r0r1r2us


zParsedLiteral.runNrQr0r0r0r1rSorRrSc@s2eZdZdZdZejejejd�ZdZ	dd�Z
dS)�	CodeBlockz�Parse and mark up content of a code block.

    Configuration setting: syntax_highlight
       Highlight Code content with Pygments?
       Possible values: ('long', 'short', 'none')

    r)r
r�number-linesTc	
Cs�|��|jr
|jd}nd}t|j�dg}|r|�|�d|jvr+|�|jd�ztd�|j�||j	j
jj�}Wn*t
ye}z|j	j
jjdkrVtd�|j�|d�}n|�|��WYd}~nd}~wwd|jvr�zt|jdpsd	�}Wnty�|�d
��w|t|j�}t|||�}tjd�|j�|d�}|�|�d|jvr�|jd|jd<|D]\}}|r�|tj|||d�7}q�|t�|�7}q�|gS)
Nrr�coderr��nonerVrz+:number-lines: with non-integer start valuerE�source)rrrrr r!rr"r#r�document�settings�syntax_highlightr�report_level�warning�int�
ValueErrorrrIr	rrTr&�
attributes�inline�Text)	r)�languager�tokensr�	startline�endliner�valuer0r0r1r2�sL



�
���

�

z
CodeBlock.runN)r3r4r5�__doc__r7rr9r:r;r<r2r0r0r0r1rU�s�rUc@rC)�	MathBlockrTcCstt|j�|��d�|j��d�}g}|D]!}|sqtj|j|fi|j��}|j	d|_
|�|�|�|�q|S)Nrz

r)
rrrr"r#�splitr�
math_block�
block_textr(rHr&r )r)r#�_nodesrMrr0r0r1r2�s

z
MathBlock.runNrQr0r0r0r1rk�s�rkc@s.eZdZdZdZdZejejd�Z	dd�Z
dS)�RubricrrTrcCsXt|j�|jd}|j�||j�\}}tj|dg|�Ri|j��}|�|�|g|S)Nrr)	rrrrrrr�rubricr&)r)�rubric_textr+r,rqr0r0r1r2�s



z
Rubric.runN)r3r4r5r6r7r8rr9r:r;r2r0r0r0r1rp�s�rpc@seZdZdZgZdd�ZdS)�
BlockQuoteTcCsF|��|j�|j|j�}|D]}t|tj�r |d|j7<q|S)Nr)rr�block_quoter#r(rrr)r)�elements�elementr0r0r1r2�s�zBlockQuote.runN)r3r4r5r<rr2r0r0r0r1rs�srsc@�eZdZdgZdS)�Epigraph�epigraphN�r3r4r5rr0r0r0r1rx�r?rxc@rw)�
Highlights�
highlightsNrzr0r0r0r1r{�r?r{c@rw)�	PullQuotez
pull-quoteNrzr0r0r0r1r}r?r}c@rC)�CompoundrTcCs\|��d�|j�}t�|�}|d|j�dg�7<|�|�|j�	|j|j
|�|gS)Nrrr
)rr"r#r�compoundrr%r&rr'r()r)r/rr0r0r1r2
s

zCompound.runNrQr0r0r0r1r~rRr~c@s*eZdZdZdZdejiZdZdd�Z	dS)�	ContainerrTrc	Cs�|��d�|j�}z|jrt�|jd�}ng}Wnty.|�d|j|jdf��wt	�
|�}|d�|�|�|�|j
�|j|j|�|gS)Nrrz7Invalid class attribute value for "%s" directive: "%s".r)rr"r#rrr9rarrr�	containerr!r&rr'r()r)r/rrr0r0r1r2s&����

z
Container.runN)
r3r4r5r7r8rr:r;r<r2r0r0r0r1r�s
r�N)rj�
__docformat__�docutilsr�docutils.parsers.rstrr�docutils.parsers.rst.rolesr�docutils.utils.code_analyzerrrr	r
r=r@rDrSrUrkrprsrxr{r}r~r�r0r0r0r1�<module>s*)A