Skip to content

Commit

Permalink
Regex() -> toRegex()
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Feb 7, 2024
1 parent d9719db commit 3d0e514
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/LangTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract class LangTask: DefaultTask() {
abstract val modId: Property<String>

private val gson = GsonBuilder().setPrettyPrinting().create()
private val DIR_REGEX = Regex("^[a-z]{2}-[A-Z]{2}$")
private val DIR_REGEX = "^[a-z]{2}-[A-Z]{2}$".toRegex()
private val processors = listOf(
VariantTooltipProcessor(),
ModDescriptionProcessor()
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/VariantTooltipProcessor.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class VariantTooltipProcessor : LangProcessor {
private val VARIANT_REGEX = Regex("\\.@(?<variant>[^.]+)Tooltip(?<index>\\[\\d+])?${'$'}")
private val VARIANT_REGEX = "\\.@(?<variant>[^.]+)Tooltip(?<index>\\[\\d+])?$".toRegex()

override fun process(
modID: String,
Expand Down

0 comments on commit 3d0e514

Please sign in to comment.