mirror of
https://github.com/cupcakearmy/cometa.git
synced 2025-03-12 14:27:28 +00:00
Correct for statement splitter
This commit is contained in:
parent
a904940d8c
commit
5406862127
@ -133,9 +133,12 @@ export const loop: ActionFunction = (html, options, re) => {
|
||||
throw new Error(error.parse.default)
|
||||
|
||||
// Extract variable name from the if statemtent
|
||||
const statement = current.found[0].slice(re.begin.length + re.if.length, -re.ending.length).trim().split(re.for_in)
|
||||
current.variable = statement[0].trim()
|
||||
current.arr = statement[1].trim()
|
||||
const statement = current.found[0]
|
||||
.slice(re.begin.length + re.if.length, -re.ending.length).trim()
|
||||
.split(new RegExp(` +${re.for_in} +`, 'g'))
|
||||
|
||||
current.variable = statement[0]
|
||||
current.arr = statement[1]
|
||||
|
||||
let next
|
||||
do {
|
||||
|
Loading…
x
Reference in New Issue
Block a user