pull/274/head
gedoor 4 years ago
parent 15e91fd68b
commit 2ee8cd799c
  1. 1
      app/src/main/java/io/legado/app/utils/StringExtensions.kt

@ -34,7 +34,6 @@ fun String?.isJsonArray(): Boolean =
fun String?.htmlFormat(): String = fun String?.htmlFormat(): String =
this?.replace("</?(?:div|p|b|br|hr|h\\d|article|dd|dl|span|link|title)[^>]*>".toRegex(), "\n") this?.replace("</?(?:div|p|b|br|hr|h\\d|article|dd|dl|span|link|title)[^>]*>".toRegex(), "\n")
?.replace("<[script>]*.*?>|&nbsp;".toRegex(), "")
?.replace("\\s*\\n+\\s*".toRegex(), "\n  ") ?.replace("\\s*\\n+\\s*".toRegex(), "\n  ")
?.replace("^[\\n\\s]+".toRegex(), "  ") ?.replace("^[\\n\\s]+".toRegex(), "  ")
?.replace("[\\n\\s]+$".toRegex(), "") ?.replace("[\\n\\s]+$".toRegex(), "")

Loading…
Cancel
Save