Consume trailing whitespace after a plain link.
All checks were successful
rustfmt Build rustfmt has succeeded
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded

This commit is contained in:
Tom Alexander 2023-09-06 14:25:49 -04:00
parent 84edd10864
commit 28b2d27054
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
3 changed files with 5 additions and 0 deletions

View File

@ -0,0 +1 @@
This folder contains org-mode documents that get automatically included as tests using build.rs.

View File

@ -0,0 +1 @@
mailto:foo@bar.baz .

View File

@ -11,6 +11,7 @@ use nom::combinator::verify;
use nom::multi::many_till;
use super::org_source::OrgSource;
use super::util::maybe_consume_object_trailing_whitespace_if_not_exiting;
use crate::context::parser_with_context;
use crate::context::ContextElement;
use crate::context::ExitClass;
@ -61,6 +62,8 @@ pub fn plain_link<'b, 'g, 'r, 's>(
let (remaining, _separator) = tag(":")(remaining)?;
let (remaining, path) = path_plain(context, remaining)?;
peek(parser_with_context!(post)(context))(remaining)?;
let (remaining, _trailing_whitespace) =
maybe_consume_object_trailing_whitespace_if_not_exiting(context, remaining)?;
let source = get_consumed(input, remaining);
Ok((
remaining,