1
0
Fork 0
mirror of synced 2024-10-01 01:28:51 +13:00

Simplifying review comment changes.

This commit is contained in:
mike12345567 2020-09-22 08:58:16 +01:00
parent 0e932a1999
commit e10a8d1f05

View file

@ -10,8 +10,7 @@ function cleanMustache(string) {
"]": "",
}
let regex = new RegExp(/{{[^}}]*}}/g)
let matches = [...string.matchAll(regex)]
for (let match of matches) {
for (let match of string.matchAll(regex)) {
let baseIdx = string.indexOf(match)
for (let key of Object.keys(charToReplace)) {
let idxChar = match[0].indexOf(key)