inline: do not merge discontinuous str
may appear when ignoring attributes
This commit is contained in:
parent
d3b2ee14cb
commit
79dfd3be36
1 changed files with 2 additions and 2 deletions
|
@ -662,10 +662,9 @@ impl<I: Iterator<Item = char> + Clone> Iterator for Parser<I> {
|
|||
matches!(
|
||||
e.kind,
|
||||
EventKind::Str | EventKind::Whitespace | EventKind::Placeholder
|
||||
)
|
||||
) && span.end() == e.span.start()
|
||||
}) {
|
||||
let ev = self.events.pop_front().unwrap();
|
||||
assert_eq!(span.end(), ev.span.start());
|
||||
span = span.union(ev.span);
|
||||
}
|
||||
Some(Event {
|
||||
|
@ -950,6 +949,7 @@ mod test {
|
|||
(Str, "abc"),
|
||||
(Exit(Span), "]"),
|
||||
);
|
||||
test_parse!("not a [span] {#id}.", (Str, "not a [span] "), (Str, "."));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in a new issue