Simplifying review comment changes.
This commit is contained in:
parent
0e932a1999
commit
e10a8d1f05
|
@ -10,8 +10,7 @@ function cleanMustache(string) {
|
||||||
"]": "",
|
"]": "",
|
||||||
}
|
}
|
||||||
let regex = new RegExp(/{{[^}}]*}}/g)
|
let regex = new RegExp(/{{[^}}]*}}/g)
|
||||||
let matches = [...string.matchAll(regex)]
|
for (let match of string.matchAll(regex)) {
|
||||||
for (let match of matches) {
|
|
||||||
let baseIdx = string.indexOf(match)
|
let baseIdx = string.indexOf(match)
|
||||||
for (let key of Object.keys(charToReplace)) {
|
for (let key of Object.keys(charToReplace)) {
|
||||||
let idxChar = match[0].indexOf(key)
|
let idxChar = match[0].indexOf(key)
|
||||||
|
|
Loading…
Reference in New Issue