Remove .md suffix stripping from key lookups
The strip_md_suffix function was removed but its usages remained, causing lookups like `identity.md` to fail (stripped to `identity` which didn't exist). Now keys are used as-is. Renamed 4 nodes that had .md suffixes to canonical form: - identity.md → identity - promotion-work-queue.md-* → promotion-work-queue-* - patterns.md#* → patterns-* - practices.md#* → practices-* Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
6c28eebb3f
commit
e8462af505
3 changed files with 4 additions and 30 deletions
|
|
@ -23,16 +23,6 @@ fn normalize_link_key(raw: &str) -> String {
|
|||
|
||||
let mut key = key.to_string();
|
||||
|
||||
// Strip .md suffix if present
|
||||
if let Some(stripped) = key.strip_suffix(".md") {
|
||||
key = stripped.to_string();
|
||||
} else if key.contains('#') {
|
||||
let (file, section) = key.split_once('#').unwrap();
|
||||
if let Some(bare) = file.strip_suffix(".md") {
|
||||
key = format!("{}-{}", bare, section);
|
||||
}
|
||||
}
|
||||
|
||||
// weekly/2026-W06 → weekly-2026-W06, etc.
|
||||
if let Some(pos) = key.find('/') {
|
||||
let prefix = &key[..pos];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue