Merge pull request #1664 from Xwite/master

更新dataUrl(txt)图片正则
pull/1673/head
kunfei 3 years ago committed by GitHub
commit 34fbf1f7e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/src/main/java/io/legado/app/constant/AppPattern.kt

@ -11,7 +11,7 @@ object AppPattern {
//匹配格式化后的图片格式 //匹配格式化后的图片格式
val imgPattern: Pattern = Pattern.compile("<img[^>]*src=\"([^\"]*(?:\"[^>]+\\})?)\"[^>]*>") val imgPattern: Pattern = Pattern.compile("<img[^>]*src=\"([^\"]*(?:\"[^>]+\\})?)\"[^>]*>")
//dataURL图片类型 //dataURL图片类型
val dataUriRegex = Regex("data:[\\w/\\-\\.]+;base64,(.*)") val dataUriRegex = Regex("data:.*?;base64,(.*)")
val nameRegex = Regex("\\s+作\\s*者.*|\\s+\\S+\\s+著") val nameRegex = Regex("\\s+作\\s*者.*|\\s+\\S+\\s+著")
val authorRegex = Regex("^\\s*作\\s*者[::\\s]+|\\s+著") val authorRegex = Regex("^\\s*作\\s*者[::\\s]+|\\s+著")

Loading…
Cancel
Save