From 56348a6d54485a5cf7524a95e1085883dec2087d Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 7 Oct 2023 00:15:37 -0400 Subject: [PATCH] Actually absolute paths are files too. --- org_mode_samples/object/regular_link/fuzzy_link.org | 1 - src/parser/regular_link.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/org_mode_samples/object/regular_link/fuzzy_link.org b/org_mode_samples/object/regular_link/fuzzy_link.org index ce26f30..17ebd7a 100644 --- a/org_mode_samples/object/regular_link/fuzzy_link.org +++ b/org_mode_samples/object/regular_link/fuzzy_link.org @@ -1,5 +1,4 @@ [[elisp.org]] -[[/elisp.org]] [[eli sp.org]] diff --git a/src/parser/regular_link.rs b/src/parser/regular_link.rs index 5dbd8b9..a99dee3 100644 --- a/src/parser/regular_link.rs +++ b/src/parser/regular_link.rs @@ -239,7 +239,7 @@ fn apply_link_templates<'b, 'g, 'r, 's>( fn file_path_reg<'s>(input: OrgSource<'s>) -> Res, PathReg<'s>> { let (remaining, (raw_link, (_, path, search_option))) = consumed(tuple(( - alt((tag("file:"), peek(tag(".")))), + alt((tag("file:"), peek(tag(".")), peek(tag("/")))), recognize(many_till(anychar, alt((peek(tag("::")), eof)))), opt(map(tuple((tag("::"), rest)), |(_, search_option)| { search_option