Do not allow empty path in plain links and do not remove "//" in regular links.

This commit is contained in:
Tom Alexander 2023-10-08 09:34:47 -04:00
parent 1bbe8fc688
commit 038535174b
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 2 additions and 3 deletions

View File

@ -142,7 +142,7 @@ fn file_path_plain<'b, 'g, 'r, 's>(
parse_file_and_application,
),
tag(":"),
recognize(opt(parser_with_context!(path_plain)(&parser_context))),
parser_with_context!(path_plain)(&parser_context),
opt(map(
tuple((
tag("::"),

View File

@ -271,9 +271,8 @@ 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),