mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-07 11:28:07 +02:00
Bugfix: Change matching pattern.
This commit is contained in:
parent
d369c2c658
commit
014c613577
@ -70,8 +70,7 @@ class RichTextParser() {
|
||||
} else if (it.originalUrl.contains("。")) {
|
||||
null
|
||||
} else {
|
||||
val pattern = "^(http|https)://([A-Z0-9][A-Z0-9_-]*(?:.[A-Z0-9][A-Z0-9_-]*)+):?(d+)?/?".toRegex(RegexOption.IGNORE_CASE)
|
||||
if (pattern.matches(it.originalUrl)) {
|
||||
if (Patterns.WEB_URL.matcher(it.originalUrl).matches()) {
|
||||
it.originalUrl
|
||||
} else {
|
||||
null
|
||||
|
Loading…
x
Reference in New Issue
Block a user