diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-09 21:31:29 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-09 21:31:29 +0800 |
| commit | 6ebe39bdfa131a2ad7cb4ac73999c4161404c698 (patch) | |
| tree | ad52e6a83b8e5d60ab2892b005a0cf680a042503 /dev_tools | |
| parent | 8eba232bffa838523246ca78cd629bf9db8cd77b (diff) | |
fix: compare non-numeric sidebar entries lexicographically
Diffstat (limited to 'dev_tools')
| -rw-r--r-- | dev_tools/src/bin/docsify-sidebar-gen.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dev_tools/src/bin/docsify-sidebar-gen.rs b/dev_tools/src/bin/docsify-sidebar-gen.rs index 016afe1..b926112 100644 --- a/dev_tools/src/bin/docsify-sidebar-gen.rs +++ b/dev_tools/src/bin/docsify-sidebar-gen.rs @@ -246,7 +246,7 @@ fn find_git_repo() -> Option<std::path::PathBuf> { fn natural_cmp(a: &str, b: &str) -> std::cmp::Ordering { let num_a = extract_leading_number(a); let num_b = extract_leading_number(b); - num_a.cmp(&num_b) + num_a.cmp(&num_b).then_with(|| a.cmp(b)) } /// Extract the leading numeric prefix from a sidebar link path. |
