fix: parse mention even if it's the last thing in the string
This commit is contained in:
parent
52339e6b98
commit
797ce06eba
2 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,4 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use super::*;
|
||||
use crate::cache::Cache;
|
||||
use crate::model::auth::Notification;
|
||||
|
|
|
@ -320,7 +320,7 @@ impl User {
|
|||
}
|
||||
|
||||
if at {
|
||||
if (char == ' ') && !escape {
|
||||
if char == ' ' {
|
||||
// reached space, end @
|
||||
at = false;
|
||||
|
||||
|
@ -339,6 +339,10 @@ impl User {
|
|||
escape = false;
|
||||
}
|
||||
|
||||
if !buffer.is_empty() {
|
||||
out.push(buffer);
|
||||
}
|
||||
|
||||
// return
|
||||
out
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue