diff options
author | Linnea Gräf <nea@nea.moe> | 2024-03-19 10:50:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-19 10:50:48 +0100 |
commit | 30a6f963fe6a1a9478db26d0db47062f39422eef (patch) | |
tree | 58ae072dfeda5c5b1bfe2278ed1fbb1e27a40362 /src/main | |
parent | a4946da8409040003d96c7d8d43ed394597bf675 (diff) | |
download | skyhanni-30a6f963fe6a1a9478db26d0db47062f39422eef.tar.gz skyhanni-30a6f963fe6a1a9478db26d0db47062f39422eef.tar.bz2 skyhanni-30a6f963fe6a1a9478db26d0db47062f39422eef.zip |
Backend: Add open in regex101.com intention (#1210)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt | 3 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPattern.kt | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt index 31f06ca01..7ba5102bc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt @@ -271,6 +271,9 @@ class ChatFilter { "§eObtain a §r§6Booster Cookie §r§efrom the community shop in the hub!", ) + /** + * REGEX-TEST: §e[NPC] Jacob§f: §rYour §9Anita's Talisman §fis giving you §6+25☘ Carrot Fortune §fduring the contest! + */ private val anitaFortunePattern by RepoPattern.pattern( "chat.jacobevent.accessory", "§e\\[NPC] Jacob§f: §rYour §9Anita's \\w+ §fis giving you §6\\+\\d{1,2}☘ .+ Fortune §fduring the contest!" diff --git a/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPattern.kt b/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPattern.kt index 715c907e4..2e1259343 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPattern.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPattern.kt @@ -84,6 +84,11 @@ interface RepoPattern : ReadOnlyProperty<Any?, Pattern> { /** * Obtain a reference to a [Pattern] backed by either a local regex, or a remote regex. * Check the documentation of [RepoPattern] for more information. + * + * This method supports "Open regex101.com" using [LivePlugin](https://plugins.jetbrains.com/plugin/7282-liveplugin). + * To use it, install LivePlugin, enable "Run plugins on IDE start" and "Run project specific plugins". + * Now you can use ALT+ENTER while hovering over a [pattern] call using your text cursor to access the "Open in regex101.com" intention. + * Add a KDoc comment to the associated variable containing lines starting with `REGEX-TEST: ` to pre-fill examples. */ fun pattern(key: String, @Language("RegExp") fallback: String): RepoPattern { return RepoPatternManager.of(key, fallback) |