Relative paths are file links, absolute paths are fuzzy.

This commit is contained in:
Tom Alexander
2023-10-06 23:48:55 -04:00
parent ab33730830
commit aa0a0b890e
3 changed files with 5 additions and 1 deletions

View File

@@ -233,7 +233,7 @@ fn apply_link_templates<'b, 'g, 'r, 's>(
fn file_path_reg<'s>(input: OrgSource<'s>) -> Res<OrgSource<'s>, PathReg<'s>> {
let (remaining, (raw_link, (_, path, search_option))) = consumed(tuple((
tag("file:"),
alt((tag("file:"), peek(tag(".")))),
recognize(many_till(anychar, alt((peek(tag("::")), eof)))),
opt(map(tuple((tag("::"), rest)), |(_, search_option)| {
search_option