mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2024-11-10 09:07:46 +01:00
fix: invalid regex
This commit is contained in:
parent
152b2c90cf
commit
26bf1d818f
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue