fix: community handle and user mention regexes (#1147)
This commit is contained in:
parent
2cc88e888f
commit
289f4b1a64
@ -12,10 +12,10 @@ internal object LemmyLinkRegex {
|
|||||||
"([a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]\\.)+[a-zA-Z]{2,}"
|
"([a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]\\.)+[a-zA-Z]{2,}"
|
||||||
|
|
||||||
val handle: Regex =
|
val handle: Regex =
|
||||||
Regex("(?<=\\s)!(?<detail>$DETAIL_FRAGMENT)(?:@(?<instance>$INSTANCE_FRAGMENT))?\\b")
|
Regex("!(?<detail>$DETAIL_FRAGMENT)(?:@(?<instance>$INSTANCE_FRAGMENT))?")
|
||||||
|
|
||||||
val mention: Regex =
|
val mention: Regex =
|
||||||
Regex("(?<=\\s)@(?<detail>$DETAIL_FRAGMENT)@(?<instance>$INSTANCE_FRAGMENT)\\b")
|
Regex("@(?<detail>$DETAIL_FRAGMENT)@(?<instance>$INSTANCE_FRAGMENT)")
|
||||||
}
|
}
|
||||||
|
|
||||||
internal object ImageRegex {
|
internal object ImageRegex {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user