Do not accept escaping {} for entities ending in whitespace.
This commit is contained in:
parent
c679a85e77
commit
99318f39e3
@ -5,6 +5,7 @@ use nom::combinator::eof;
|
||||
use nom::combinator::map;
|
||||
use nom::combinator::peek;
|
||||
use nom::combinator::recognize;
|
||||
use nom::combinator::verify;
|
||||
use nom::sequence::tuple;
|
||||
|
||||
use super::org_source::OrgSource;
|
||||
@ -53,7 +54,7 @@ fn name<'b, 'g, 'r, 's>(
|
||||
let result = tuple((
|
||||
tag::<_, _, CustomError<_>>(entity.name),
|
||||
alt((
|
||||
map(tag("{}"), |_| true),
|
||||
verify(map(tag("{}"), |_| true), |_| !entity.name.ends_with(" ")),
|
||||
map(peek(recognize(entity_end)), |_| false),
|
||||
)),
|
||||
))(input);
|
||||
|
Loading…
Reference in New Issue
Block a user