From a44019900660979e9d33b16a2dd58bd7209ebfcf Mon Sep 17 00:00:00 2001 From: Hubert Van De Walle Date: Wed, 19 Aug 2020 19:21:54 +0200 Subject: [PATCH] Fix unsupported method on jdk backend --- app/src/main/kotlin/utils/SearchTermsParser.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/utils/SearchTermsParser.kt b/app/src/main/kotlin/utils/SearchTermsParser.kt index f7dc499..733f43e 100644 --- a/app/src/main/kotlin/utils/SearchTermsParser.kt +++ b/app/src/main/kotlin/utils/SearchTermsParser.kt @@ -9,17 +9,17 @@ private val tagRe = """tag:['"](?.*?)['"]""".toRegex() private val outerTagRe = """(?tag:['"].*?['"])""".toRegex() fun parseSearchTerms(input: String): SearchTerms { - val title: String? = titleRe.find(input)?.groups?.get("title")?.value - val tag: String? = tagRe.find(input)?.groups?.get("tag")?.value + val title: String? = titleRe.find(input)?.groups?.get(1)?.value + val tag: String? = tagRe.find(input)?.groups?.get(1)?.value var c: String = input if (title != null) { - val titleGroup = outerTitleRe.find(input)?.groups?.get("title")?.value + val titleGroup = outerTitleRe.find(input)?.groups?.get(1)?.value titleGroup?.let { c = c.replace(it, "") } } if (tag != null) { - val tagGroup = outerTagRe.find(input)?.groups?.get("tag")?.value + val tagGroup = outerTagRe.find(input)?.groups?.get(1)?.value tagGroup?.let { c = c.replace(it, "") } }