don't skip leftover string after shortcode
This commit is contained in:
parent
279677eb5c
commit
2ae2ee0fd5
|
@ -115,12 +115,16 @@ fn make_emoji(event: Event) -> Event {
|
|||
let buf = buf.get_or_insert_with(|| String::with_capacity(text.len()));
|
||||
buf.push_str(&text[top..old-1]);
|
||||
buf.push_str(emoji.as_str());
|
||||
top = idx;
|
||||
top = idx + 1;
|
||||
}
|
||||
|
||||
old = idx + 1;
|
||||
}
|
||||
|
||||
if let Some(ref mut buf) = buf {
|
||||
buf.push_str(&text[top..]);
|
||||
}
|
||||
|
||||
match buf {
|
||||
None => event,
|
||||
Some(buf) => Event::Text(buf.into())
|
||||
|
|
Loading…
Reference in a new issue