
    ~(ph+                     <    S r SSKrSS/rS	S jrS
S jrS rSS jrg)zPretty-Print an Interface object as structured text (Yum)

This module provides a function, asStructuredText, for rendering an
interface as structured text.
    NasReStructuredTextasStructuredTextc                    U(       a  S nOS nU" U R                  5       5      /nUR                  nSnU R                  5       (       a)  U" [        [	        U R                  5       5      U5      5        U R
                   Vs/ s H$  nU[        R                  R                  Ld  M"  UPM&     nnU(       aY  U" [        SXa5      5        US-  nU H7  n	SU" U	R                  5       5      -  n
U" [        [	        U
5      Xa5      5        M9     US-  n[        U R                  5       5      nU" [        SXa5      5        US-  nU Hp  u  p[        US5      (       a  M  SR                  U" UR                  5       5      UR                  5       =(       d    S	5      n
U" [        [	        U
5      Xa5      5        Mr     US-  nU" [        S
Xa5      5        US-  nU H  u  p[        US5      (       d  M  UR                  5        UR                  5        3nSR                  U" U5      UR                  5       =(       d    S	5      n
U" [        [	        U
5      Xa5      5        M     SR                  U5      S-   $ s  snf )zOutput structured text format.  Note, this will whack any existing
'structured' format of the text.

If `rst=True`, then the output will quote all code as inline literals in
accordance with 'reStructuredText' markup principles.
c                     SU  S3$ )Nz`` ss    J/var/www/html/venv/lib/python3.13/site-packages/zope/interface/document.pyinline_literal(asStructuredText.<locals>.inline_literal%   s    s":    c                     U $ )Nr   r   s    r
   r   r   (   s    Hr      zThis interface extends:zo %szAttributes:getSignatureStringz{} -- {}zno documentationzMethods:z

)getNameappendgetDoc_justify_and_indent_trim_doc_string	__bases__zope	interface	InterfacesortednamesAndDescriptionshasattrformatr   join)ifacemungerstr   routplevelbasebasesbitemr   namedesc_calls                  r
   r   r      s5    		 
	()A88DE||~~ !1%,,.!A5IJ (DNN444 ( 
   !:EIJ
AN199;77D$%5d%;UJK  	
!%"<"<">?	]E	9:	QJE*
t122$$t||~.3!3D $%5d%;UJK + 
QJE	Z	67	QJE*
4-..||~&t'>'>'@&ABE$$u%3!3D $%5d%;UJK + ;;q>F""Is    !I-%I-c                     [        XSS9$ )zdOutput reStructuredText format.

Note, this will whack any existing 'structured' format of the text.T)r    r!   )r   )r   r    s     r
   r   r   Y   s     ED99r   c           
      X   U R                  SS5      R                  S5      nUR                  S5      /nU(       a[  [        U Vs/ s H(  n[	        U5      [	        UR                  5       5      -
  PM*     sn5      nU H  nUR                  X4S 5        M     SR                  U5      $ s  snf )zETrims a doc string to make it format
correctly with structured text. 

r   N)replacesplitpopminlenlstripr   r   )textlinesnlinesline
min_indents        r
   r   r   `   s     LL&,,T2Eiil^F&+-&+d d)c$++-&88&+- .
DMM${+,  99V-s   /B'c                 p   SU-  nU(       au  / nUnU R                  5       n U  H9  nSR                  Xg/5      n[        U5      U:  d  M&  UR                  U5        UnM;     UR                  U5        SR                  U5      $ UU R	                  5       R                  SS5      R                  SSU-   5      -   $ )z8indent and justify text, rejustify (munge) if specified  r/   r.   )r1   r   r4   r   stripr0   )r6   r$   r    widthindentr7   r9   words           r
   r   r   o   s     5[Fzz|D88TL)D4y5 T"	  LLyy JJL  .77dVmLM 	Mr   )r   F)r   )r   H   )__doc__zope.interfacer   __all__r   r   r   r   r   r   r
   <module>rE      s4   
  :#z:Mr   