Do not allow unescaped opening bracket in path for link.

This commit is contained in:
Tom Alexander 2023-09-21 13:41:48 -04:00
parent 7b61329889
commit 853adadf91
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -78,7 +78,7 @@ fn pathreg<'b, 'g, 'r, 's>(
) -> Res<OrgSource<'s>, OrgSource<'s>> {
let (remaining, path) = escaped(
take_till1(|c| match c {
'\\' | ']' => true,
'\\' | '[' | ']' => true,
_ => false,
}),
'\\',