fix(lsp): resolve wikilinks that include the .wiki file extension
`[[page.wiki]]` should resolve identically to `[[page]]`. The index keyed by stem, so links with the explicit extension fell through to the broken-link diagnostic and to-page navigation failed. Strip the configured extension before every page lookup (resolve, definition, backlinks, classify_link, classify_outgoing) and stop appending the extension in synthesise_page_uri when it's already present. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,7 +26,8 @@ pub struct Wiki {
|
||||
impl Wiki {
|
||||
pub fn new(id: WikiId, config: WikiConfig) -> Self {
|
||||
let index = WorkspaceIndex::new(Some(config.root.clone()))
|
||||
.with_diary_rel_path(Some(config.diary_rel_path.clone()));
|
||||
.with_diary_rel_path(Some(config.diary_rel_path.clone()))
|
||||
.with_file_extension(Some(config.file_extension.clone()));
|
||||
let index = Arc::new(RwLock::new(index));
|
||||
Self { id, config, index }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user