mirror of
https://github.com/revanced/revanced-patches
synced 2025-01-02 17:45:48 +01:00
fix: invalid regex
This commit is contained in:
parent
152b2c90cf
commit
26bf1d818f
@ -4,7 +4,7 @@ class Template(template: String) {
|
||||
val result: StringBuilder = StringBuilder(template)
|
||||
|
||||
fun replaceVariable(name: String, value: String) {
|
||||
val regex = Regex("{{\\s?$name\\s?}}")
|
||||
val regex = Regex("\\{\\{\\s?$name\\s?}}")
|
||||
val range = regex.find(result)!!.range
|
||||
|
||||
result.replace(range.first, range.last + 1, value)
|
||||
|
Loading…
Reference in New Issue
Block a user