Files
intellecton/venv/lib/python3.12/site-packages/pymdownx/__pycache__/details.cpython-312.pyc
T

61 lines
7.8 KiB
Plaintext
Raw Normal View History

Ë
jHãóldZddlmZddlmZddlmcmZddlZGdde«Z Gdde«Z
d „Z y)
a_
Details.
pymdownx.details
MIT license.
Copyright (c) 2017 Isaac Muse <isaacmuse@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
é)Ú Extension)ÚBlockProcessorNcó‚eZdZdZej
d«Zej
d«ZˆfdZdZ dZ
dZ dZ ˆxZ
S) ÚDetailsProcessorzDetails block processor.za(?:^|\n)\?{3}(\+)? ?(?:([\w\-]+(?: +[\w\-]+)*?)?(?: +"(.*?)")|([\w\-]+(?: +[\w\-]+)*?)) *(?:\n|$)z {2,}có@t||«d|_d|_y)zInitialization.Nr)ÚsuperÚ__init__Úcurrent_siblingÚcontent_indention)ÚselfÚparserÚ __class__s €úS/home/antigravity/intellecton/venv/lib/python3.12/site-packages/pymdownx/details.pyr zDetailsProcessor.__init__&s"ø€ô Ñ˜Ô àÔØ!"ˆÕócó*g}|jd«}|D]N}|jd|z«r|j||d«Œ,|j«s|jd«ŒNndj |«dj |t |«d«fS)z;Remove a tab from the front of each line of the given text.ú
ú)ÚsplitÚ
startswithÚappendÚstripÚjoinÚlen)r ÚtextÚlengthÚnewtextÚlinesÚlines rÚdetab_by_lengthz DetailsProcessor.detab_by_length.ðˆØ
˜4Ó ˆØò ˆDؘs V™|Ô˜t F G˜}Õ—Z‘Z”\ؘrÕð
 ðy‰y˜Ó! 4§9¡9¨U´3°w³<°=Ð-AÓ#BÐBrcóÚ|}d}|j>|j}|j||j«\}}d|_d|_|||fS|j|«}||jj «dk7rd}næ|j|«}d}|}|v|j
d|jzdz«rU|S|jdvrE|j|«}||j|«nd}||jd}||jz
}nd}|Œ}|j
d|jz«sd}|2||jz
}|j||«\}}||_||_|||fS)z
Get sibling details.
Retrieve the appropriate sibling element. This can get tricky when
dealing with lists.
rNrÚdetailsré)ÚulÚolÚdl)r
r Úcontent_indentÚ lastChildÚtagÚlowerrÚ
tab_length)r ÚparentÚblockÚ old_blockÚ non_detailsÚsiblingÚ
last_childÚindents rÚ
parse_contentzDetailsProcessor.parse_content<sðˆ Øˆ ð × Ñ Ð ×*ˆGØ!%×!5Ñ!5°e¸T×=PÑ=PÓ!QÑ ˆE;Ø#'ˆ Ø"#ˆ ؘE  —.‘. Óà ˆ?˜gŸk™k×1°YÒ‰GðŸ¨Ó0ˆJ؈FØÐÐ'¨E×,<Ñ,<¸SÀ4Ç?Á?Ñ=RÐUVÑ=VÔ,WØÐ*¨z¯~©~ÐASÑ/Sð
#Ÿn™n¨ZÓ8GØ<CÐ<O §¡°Ô!8ÐUY
" $§/¡/Ð"2Ð3˜dŸo™oÑ-Fà!%Jð#Ñ(ð&×# C¨$¯/©/Ñ$9ÔàИ$Ÿ/™/Ñ)Ø%)×%9Ñ%9¸)ÀVÓ%LÑ"{Ø'.Ô$Ø&,Ô˜˜*rcóh|jj|«ry|j||«dduS)z Test block.TrN)ÚSTARTÚsearchr3)r r,r-s rÚtestzDetailsProcessor.testws6ð :‰:× Ñ ˜UÔ à×% f¨eÓ4°QÑ7¸ Crcó |jd«}|jj|«}|ri|j«dkDr.|jj ||d|j«g«||j
«d}|j|«\}}n|j||«\}}}|r!|jd«}|du}|jd«r\|jjd|jd«j««} | jd«dj«}
nP|jd«} | dn)|jjd| j««} |jd«}
tj |d |rd
d
ini«} | r| j#d | «tj | d «}
|
|
_nLj&d
vr<|j$r0|j$}d|_tj |d«}||_|} |jj)| |«|r|j+d|«yy)z!Convert to details/summary block.rérr#rér"ÚopenÚclassÚsummary)ÚliÚddÚp)Úpopr5r6Ústartr
Ú parseBlocksÚendÚdetabr3ÚgroupÚCOMPRESS_SPACESÚsubr*rÚ