No need to make the block optional.
This commit is contained in:
parent
da7743f0bb
commit
7506070698
1 changed files with 2 additions and 2 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue