1
0
Fork 0
forked from alemi/upub

fix(web): multiple mentions should not nest

This commit is contained in:
əlemi 2024-07-04 04:42:34 +02:00
parent 5c97b40ea6
commit b2d23b7c4c
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -7,7 +7,7 @@ use crate::prelude::*;
use apb::{field::OptionalString, target::Addressed, ActivityMut, Base, Collection, CollectionMut, Object, ObjectMut}; use apb::{field::OptionalString, target::Addressed, ActivityMut, Base, Collection, CollectionMut, Object, ObjectMut};
lazy_static::lazy_static! { lazy_static::lazy_static! {
static ref REGEX: Regex = regex::Regex::new("<a href=\"(.+)\" class=\"u-url mention\">@(\\w+)(@\\w+|)</a>").expect("failed compiling @ regex"); static ref REGEX: Regex = regex::Regex::new("<a href=\"([-a-zA-Z0-9()@:%_\\+.~#?&\\/=]+)\" class=\"u-url mention\">@(\\w+)(@\\w+|)</a>").expect("failed compiling @ regex");
} }
#[component] #[component]