Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "mkdocs-include-markdown-plugin"
version = "7.2.1"
version = "7.2.2"
description = "Mkdocs Markdown includer plugin."
readme = "README.md"
license = "Apache-2.0"
Expand Down
9 changes: 7 additions & 2 deletions src/mkdocs_include_markdown_plugin/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,13 @@ def key(p: str) -> str:
return os.path.splitext(p)[1]
elif order_type == 'natural':
if order_by == 'extension':
def key(p: str) -> str:
return natural_sort_key(os.path.splitext(p)[1]) # type: ignore
def key(p: str) -> tuple[str, str]: # type: ignore
ext = os.path.splitext(p)[1].lower()
name = os.path.basename(p)
return ( # type: ignore
ext,
natural_sort_key(name),
)
elif order_by == 'name':
def key(p: str) -> str:
return natural_sort_key(os.path.basename(p)) # type: ignore
Expand Down
Loading