Fix matching of description in links.

This commit is contained in:
Tom Alexander 2023-04-24 16:05:46 -04:00
parent b4d4453186
commit 87be28ed15
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 4 additions and 3 deletions

View File

@ -77,7 +77,6 @@ pub fn description<'r, 's>(
context: Context<'r, 's>,
input: &'s str,
) -> Res<&'s str, Vec<Object<'s>>> {
let (remaining, _opening_bracket) = tag("[[")(input)?;
let parser_context =
context.with_additional_node(ContextElement::ExitMatcherNode(ExitMatcherNode {
class: ExitClass::Beta,
@ -89,7 +88,7 @@ pub fn description<'r, 's>(
parser_with_context!(exit_matcher_parser)(&parser_context),
),
|(children, _exit_contents)| !children.is_empty(),
)(remaining)?;
)(input)?;
Ok((remaining, children))
}

View File

@ -1 +1,3 @@
foo *bar baz * lorem* ipsum
[[https://fizz.buzz/]]
[[https://fizz.buzz][super cool website]]