mkdocs-include-markdown-plugin 7.3.0__tar.gz → 7.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mkdocs_include_markdown_plugin-7.3.0 → mkdocs_include_markdown_plugin-7.3.1}/PKG-INFO +2 -2
- {mkdocs_include_markdown_plugin-7.3.0 → mkdocs_include_markdown_plugin-7.3.1}/pyproject.toml +1 -1
- {mkdocs_include_markdown_plugin-7.3.0 → mkdocs_include_markdown_plugin-7.3.1}/src/mkdocs_include_markdown_plugin/process.py +10 -1
- {mkdocs_include_markdown_plugin-7.3.0 → mkdocs_include_markdown_plugin-7.3.1}/.gitignore +0 -0
- {mkdocs_include_markdown_plugin-7.3.0 → mkdocs_include_markdown_plugin-7.3.1}/LICENSE +0 -0
- {mkdocs_include_markdown_plugin-7.3.0 → mkdocs_include_markdown_plugin-7.3.1}/README.md +0 -0
- {mkdocs_include_markdown_plugin-7.3.0 → mkdocs_include_markdown_plugin-7.3.1}/src/mkdocs_include_markdown_plugin/__init__.py +0 -0
- {mkdocs_include_markdown_plugin-7.3.0 → mkdocs_include_markdown_plugin-7.3.1}/src/mkdocs_include_markdown_plugin/cache.py +0 -0
- {mkdocs_include_markdown_plugin-7.3.0 → mkdocs_include_markdown_plugin-7.3.1}/src/mkdocs_include_markdown_plugin/config.py +0 -0
- {mkdocs_include_markdown_plugin-7.3.0 → mkdocs_include_markdown_plugin-7.3.1}/src/mkdocs_include_markdown_plugin/directive.py +0 -0
- {mkdocs_include_markdown_plugin-7.3.0 → mkdocs_include_markdown_plugin-7.3.1}/src/mkdocs_include_markdown_plugin/event.py +0 -0
- {mkdocs_include_markdown_plugin-7.3.0 → mkdocs_include_markdown_plugin-7.3.1}/src/mkdocs_include_markdown_plugin/files_watcher.py +0 -0
- {mkdocs_include_markdown_plugin-7.3.0 → mkdocs_include_markdown_plugin-7.3.1}/src/mkdocs_include_markdown_plugin/logger.py +0 -0
- {mkdocs_include_markdown_plugin-7.3.0 → mkdocs_include_markdown_plugin-7.3.1}/src/mkdocs_include_markdown_plugin/placeholders.py +0 -0
- {mkdocs_include_markdown_plugin-7.3.0 → mkdocs_include_markdown_plugin-7.3.1}/src/mkdocs_include_markdown_plugin/plugin.py +0 -0
- {mkdocs_include_markdown_plugin-7.3.0 → mkdocs_include_markdown_plugin-7.3.1}/src/mkdocs_include_markdown_plugin/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: mkdocs-include-markdown-plugin
|
|
3
|
-
Version: 7.3.
|
|
3
|
+
Version: 7.3.1
|
|
4
4
|
Summary: Mkdocs Markdown includer plugin.
|
|
5
5
|
Project-URL: Source, https://github.com/mondeja/mkdocs-include-markdown-plugin
|
|
6
6
|
Project-URL: Documentation, https://github.com/mondeja/mkdocs-include-markdown-plugin#documentation
|
|
@@ -9,6 +9,7 @@ import re
|
|
|
9
9
|
import stat
|
|
10
10
|
from collections.abc import Callable, Iterator
|
|
11
11
|
from typing import TYPE_CHECKING
|
|
12
|
+
from urllib.parse import urljoin
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
if TYPE_CHECKING: # pragma: no cover
|
|
@@ -291,8 +292,16 @@ def rewrite_relative_urls(
|
|
|
291
292
|
``source_path`` will still work when inserted into a file at
|
|
292
293
|
``destination_path``.
|
|
293
294
|
"""
|
|
295
|
+
source_is_url = is_url(source_path)
|
|
296
|
+
|
|
294
297
|
def rewrite_url(url: str) -> str:
|
|
295
|
-
if
|
|
298
|
+
if is_anchor(url):
|
|
299
|
+
return url
|
|
300
|
+
|
|
301
|
+
if source_is_url:
|
|
302
|
+
return url if is_url(url) else urljoin(source_path, url)
|
|
303
|
+
|
|
304
|
+
if is_url(url) or is_absolute_path(url):
|
|
296
305
|
return url
|
|
297
306
|
|
|
298
307
|
new_path = os.path.relpath(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|