
    ͆h                     d    S r SSKJs  Jr  SSKJr  SSKJr   " S S\5      r " S	 S
\5      r	S r
g)zDefinition.    N   )Block   )BlocksExtensionc                   (    \ rS rSrSrSrS rS rSrg)
Definition   z
Definition.

Converts non `ul`, `ol` blocks (ideally `p` tags) into `dt`
and will convert first level `li` elements of `ul` and `ol`
elements to `dd` tags. When done, the `ul`, and `ol` elements
will be removed.
definec                 0    [         R                  " US5      $ )zCreate the element.dl)etree
SubElement)selfparents     R/opt/services/DDDS/venv/lib/python3.13/site-packages/pymdownx/blocks/definition.py	on_createDefinition.on_create   s     --    c                    / nSn[        [        U5      5       GH  u  pEUR                  R                  5       S;   a  M&  UR                  R                  5       S;  au  UR                  R                  5       S:X  a	  SUl        Mk  [        R
                  " S5      nUR                  U5        UR                  XC-   U5        UR                  U5        M  [        U5       H4  nUS-  nSUl        UR                  XC-   U5        UR                  U5        M6     UR                  U5        GM     U H  nUR                  U5        M     g)	z"Convert non list items to details.r   )dtdd)ulolpr   r   r   N)		enumeratelisttaglowerr   Elementappendinsertremove)	r   blockr"   offsetichildr   liels	            r   on_endDefinition.on_end   s     !$u+.HAyy L0",699??$+ $EIt,BIIe$LLR0LL'u+BaKF!BFLLR0LL$	 &
 e$% /( BLL r    N)	__name__
__module____qualname____firstlineno____doc__NAMEr   r)   __static_attributes__r+   r   r   r   r      s     D.
r   r   c                       \ rS rSrSrS rSrg)DefinitionExtension5   zDefinition Blocks Extension.c                 L    UR                  [        U R                  5       5        g)zExtend Markdown blocks.N)registerr   
getConfigs)r   md	block_mgrs      r   extendMarkdownBlocks(DefinitionExtension.extendMarkdownBlocks8   s     	:t'89r   r+   N)r,   r-   r.   r/   r0   r;   r2   r+   r   r   r4   r4   5   s
    &:r   r4   c                      [        U 0 UD6$ )zReturn extension.)r4   )argskwargss     r   makeExtensionr@   >   s     ///r   )r0   xml.etree.ElementTreer   ElementTreer#   r   blocksr   r   r4   r@   r+   r   r   <module>rD      s2     % %  $+ +\:/ :0r   