mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 01:19:33 +00:00
No need to make the block optional.
This commit is contained in:
+2
-2
@@ -112,8 +112,8 @@ object MatrixPatterns {
|
|||||||
* Note not all cases are implemented.
|
* Note not all cases are implemented.
|
||||||
*/
|
*/
|
||||||
fun findPatterns(text: CharSequence, permalinkParser: PermalinkParser): List<MatrixPatternResult> {
|
fun findPatterns(text: CharSequence, permalinkParser: PermalinkParser): List<MatrixPatternResult> {
|
||||||
val rawTextMatches = "\\S+?$DOMAIN_REGEX".toRegex(RegexOption.IGNORE_CASE).findAll(text)
|
val rawTextMatches = "\\S+$DOMAIN_REGEX".toRegex(RegexOption.IGNORE_CASE).findAll(text)
|
||||||
val urlMatches = "\\[\\S+?\\]\\((\\S+?)\\)".toRegex(RegexOption.IGNORE_CASE).findAll(text)
|
val urlMatches = "\\[\\S+\\]\\((\\S+)\\)".toRegex(RegexOption.IGNORE_CASE).findAll(text)
|
||||||
val atRoomMatches = Regex("@room").findAll(text)
|
val atRoomMatches = Regex("@room").findAll(text)
|
||||||
return buildList {
|
return buildList {
|
||||||
for (match in rawTextMatches) {
|
for (match in rawTextMatches) {
|
||||||
|
|||||||
Reference in New Issue
Block a user