Accept eof as a disallowed character for plain links.

This commit is contained in:
Tom Alexander 2023-10-09 20:24:43 -04:00
parent 47a440147f
commit 25531cc443
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -324,7 +324,7 @@ fn impl_path_plain_end<'b, 'g, 'r, 's>(
!" \t\r\n[]<>()/".contains(*c) && c.is_ascii_punctuation()
}))(input)?;
let disallowed_character = recognize(one_of(" \t\r\n[]<>"))(remaining);
let disallowed_character = alt((recognize(one_of(" \t\r\n[]<>")), eof))(remaining);
if disallowed_character.is_ok() {
return disallowed_character;
}