diff --git a/app/src/main/java/com/quran/labs/androidquran/database/DatabaseHandler.kt b/app/src/main/java/com/quran/labs/androidquran/database/DatabaseHandler.kt index eac9ab3099..fc2602685d 100644 --- a/app/src/main/java/com/quran/labs/androidquran/database/DatabaseHandler.kt +++ b/app/src/main/java/com/quran/labs/androidquran/database/DatabaseHandler.kt @@ -84,7 +84,7 @@ class DatabaseHandler private constructor( ContextCompat.getColor(context, R.color.translation_highlight) + "\">" defaultSearcher = DefaultSearcher(matchString, MATCH_END, ELLIPSES) - arabicSearcher = ArabicSearcher(defaultSearcher, matchString, MATCH_END, QuranFileConstants.SEARCH_EXTRA_REPLACEMENTS) + arabicSearcher = ArabicSearcher(defaultSearcher, matchString, MATCH_END) // if there's no Quran base directory, there are no databases val base = quranFileUtils.getQuranDatabaseDirectory(context) diff --git a/app/src/warsh/java/com/quran/labs/androidquran/data/QuranFileConstants.kt b/app/src/warsh/java/com/quran/labs/androidquran/data/QuranFileConstants.kt index e5f301e47a..4c7c072eb2 100644 --- a/app/src/warsh/java/com/quran/labs/androidquran/data/QuranFileConstants.kt +++ b/app/src/warsh/java/com/quran/labs/androidquran/data/QuranFileConstants.kt @@ -14,7 +14,6 @@ object QuranFileConstants { const val FETCH_QUARTER_NAMES_FROM_DATABASE = true const val FALLBACK_PAGE_TYPE = "warsh" - const val SEARCH_EXTRA_REPLACEMENTS = "\u0626" var ICON_RESOURCE_ID = com.quran.labs.androidquran.pages.warsh.R.drawable.icon } diff --git a/common/search/src/main/java/com/quran/common/search/ArabicSearcher.kt b/common/search/src/main/java/com/quran/common/search/ArabicSearcher.kt index 6a183f21f6..dd6d4acfe2 100644 --- a/common/search/src/main/java/com/quran/common/search/ArabicSearcher.kt +++ b/common/search/src/main/java/com/quran/common/search/ArabicSearcher.kt @@ -8,9 +8,8 @@ import java.util.regex.Pattern class ArabicSearcher(private val defaultSearcher: Searcher, private val matchStart: String, - private val matchEnd: String, - extraReplacements: String = "") : Searcher { - private val arabicRegex = "[$arabicRegexChars$extraReplacements]".toRegex() + private val matchEnd: String) : Searcher { + private val arabicRegex = "[$arabicRegexChars]".toRegex() override fun getQuery(withSnippets: Boolean, hasFTS: Boolean, @@ -79,6 +78,6 @@ class ArabicSearcher(private val defaultSearcher: Searcher, } companion object { - private const val arabicRegexChars = "\u0627\u0623\u0621\u062a\u0629\u0647\u0648\u0649" + private const val arabicRegexChars = "\u0627\u0623\u0621\u062a\u0629\u0647\u0648\u0649\u0626" } } diff --git a/common/search/src/main/java/com/quran/common/search/arabic/ArabicCharacterHelper.kt b/common/search/src/main/java/com/quran/common/search/arabic/ArabicCharacterHelper.kt index 395e55a2ff..85325c78e0 100644 --- a/common/search/src/main/java/com/quran/common/search/arabic/ArabicCharacterHelper.kt +++ b/common/search/src/main/java/com/quran/common/search/arabic/ArabicCharacterHelper.kt @@ -37,7 +37,7 @@ object ArabicCharacterHelper { // given: ئ // match: ئﻯي - // this is helpful for rewayat Warsh, and thus only enabled on it + // this is especially helpful for rewayat Warsh "\u0626" to "\u0626\u0649\u064a", )