Remove "//" from file paths.

This commit is contained in:
Tom Alexander 2023-10-08 09:16:48 -04:00
parent 0030ef4459
commit ba8115c648
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 5 additions and 2 deletions

View File

@ -132,12 +132,14 @@ fn file_path_plain<'b, 'g, 'r, 's>(
exit_matcher: &path_plain_end,
});
let parser_context = context.with_additional_node(&parser_context);
let (remaining, (raw_link, (application, _, path, search_option))) = consumed(tuple((
let (remaining, (raw_link, (_, application, _, _, path, search_option))) = consumed(tuple((
peek(tag("file")),
map_parser(
parser_with_context!(protocol)(&parser_context),
parse_file_and_application,
),
tag(":"),
opt(tag("//")),
parser_with_context!(path_plain)(&parser_context),
opt(map(
tuple((

View File

@ -268,8 +268,9 @@ fn file_path_reg<'b, 'g, 'r, 's>(
parse_file_and_application,
),
tag(":"),
opt(tag("//")),
)),
|(_, application, _)| application,
|(_, application, _, _)| application,
),
map(peek(tag(".")), |_| None),
map(peek(tag("/")), |_| None),