Make plain parse use forEach
This commit is contained in:
parent
8ed9d06121
commit
b1d6b159ab
1 changed files with 3 additions and 3 deletions
|
@ -29,11 +29,11 @@ const parse = function (_data, l = 0) {
|
|||
if (lang[trans] !== undefined) {
|
||||
trans = lang[trans].replace(/%%/g, '\ue123')
|
||||
}
|
||||
for (const i in data.with) {
|
||||
const j2 = parse(data.with[i], l + 1)
|
||||
data.with.forEach((item, i) => {
|
||||
const j2 = parse(item, l + 1)
|
||||
trans = trans.replace(/%s/, j2.replaceAll('%s', '\ud900\ud804').replaceAll('$s', '\ud900\ud805'))
|
||||
trans = trans.replaceAll(`%${+i + 1}$s`, j2.replaceAll('%s', '\ud900\ud804').replaceAll('$s', '\ud900\ud805'))
|
||||
}
|
||||
})
|
||||
out += trans.replaceAll('\ud900\ud801', '%').replaceAll('\ud900\ud804', '%s').replaceAll('\ud900\ud805', '$s')
|
||||
}
|
||||
if (data.extra) {
|
||||
|
|
Loading…
Reference in a new issue