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

81 lines
9.1 KiB
Plaintext
Raw Normal View History

Ë
ãó¶dZddlmZddlmZddlmZddlZddlZddl m
Z
dZ ejd «Z
d
Zd Zdd ZGd
de«ZGdde«ZdZy)a
Path Converter.
pymdownx.pathconverter
An extension for Python Markdown.
An extension to covert tag paths to relative or absolute:
Given an absolute base and a target relative path, this extension searches for file
references that are relative and converts them to a path relative
to the base path.
-or-
Given an absolute base path, this extension searches for file
references that are relative and converts them to absolute paths.
MIT license.
Copyright (c) 2014 - 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)Ú
Postprocessoré)ÚutilN)Ú
urlunparseaY(?xus)
(?:
(?P<avoid>
<\s*(?P<script_name>script|style)[^>]*>.*?</\s*(?P=script_name)\s*> |
(?:(\r?\n?\s*)<!--[\s\S]*?-->(\s*)(?=\r?\n)|<!--[\s\S]*?-->)
)|
(?P<open><\s*(?P<tag>(?:%s)))
(?P<attr>(?:\s+[\w\-:]+(?:\s*=\s*(?:"[^"]*"|'[^']*'))?)*)
(?P<close>\s*(?:\/?)>)
)
zˆ(?xus)
(?P<attr>
(?:
(?P<name>\s+(?:href|src)\s*=\s*)
(?P<path>"[^"]*"|'[^']*')
)
)
c óV|jd«} tj|jd«dd«\}}}}}} }
} |
sÔtj|«}| s½tj
j
tj
jtj
j||««tj
j|««}tj|«}dj|jd«t|||||| f««}|S#t$rY|SwxYw)z Replace path with relative path.rÚpathréÿÿÿÿú{}"{}"Úname)
ÚgrouprÚ parse_urlÚurl2pathÚosr ÚrelpathÚnormpathÚjoinÚpath2urlÚformatrÚ Exception) ÚmÚ base_pathÚ
relative_pathÚlinkÚschemeÚnetlocr ÚparamsÚqueryÚfragmentÚis_urlÚ is_absolutes úY/home/antigravity/intellecton/venv/lib/python3.12/site-packages/pymdownx/pathconverter.pyÚ
repl_relativer#Csð
7‰71:€Dð
ÜMQÏ^É^Ð\]×\cÑ\cÐdjÓ\kÐlmÐnpÐ\qÓMrÑJˆ˜˜f e¨X°v¸{áô—=‘= Ó&ˆDÙä—w‘w—Ü—G‘G×$¤R§W¡W§\¡\°)¸TÓ%BÓ—GG×$ ô
—}‘} TÓ*ØØ—G‘G˜F“OÜ ¨°°f¸eÀXÐð €Køô ò
à à €Kð 
ús“DDÄ D(Ä'D(c ó |jd«} tj|jd«dd«\}}}}}} }
} | sù|
s÷tj|«}tj
j
tj
j||««}tj|«}|rH|jd«sd|z}dj|jd«td||||| f««}|S|jd«sdnd } d
j|jd«| t|||||| f««}|S#t$rY|SwxYw) z Replace path with absolute path.rr rr