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)
|
throw new Error(error.parse.default)
|
||||||
|
|
||||||
// Extract variable name from the if statemtent
|
// 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)
|
const statement = current.found[0]
|
||||||
current.variable = statement[0].trim()
|
.slice(re.begin.length + re.if.length, -re.ending.length).trim()
|
||||||
current.arr = statement[1].trim()
|
.split(new RegExp(` +${re.for_in} +`, 'g'))
|
||||||
|
|
||||||
|
current.variable = statement[0]
|
||||||
|
current.arr = statement[1]
|
||||||
|
|
||||||
let next
|
let next
|
||||||
do {
|
do {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user