Speiger d5a47ce568 Added Iteration support.
Said support allows to use the #iterate & #argument #enditerate
parameters.
Which will duplicate the text block inside of it x amount of times with
arguments being replaced.

The idea being that if code can be replicated the iterate option would
simplify the process.

Multiple arguments can be defined (they will be not part of the output)
and it will simply insert them.
Note that all argument parameters have to be equal size.
Otherwise the iterator processor will fail.

Iterators can be stacked too to create layers upon layers.

On top of that the iterator is part of the Template parser and not of
the template processor meaning its a Pre processor step.
And all mappers still apply themselves on to the output of the
iterators!
2023-06-27 13:29:31 +02:00

53 lines
800 B
Plaintext

Hello this is my test
#ignore
TESTING should not be overriden
#endignore
TESTING should be overriden
#if TEST0
#ignore
TESTING should not be overriden too
#endignore
TESTING should be overriden too
#endif
#if TEST1
#ignore
TESTING should not be overriden
#endignore
TESTING should not be overriden
#endif
#iterate
#argument NUMBER 1 2 3 4 5 6 7 8 9
Lets test number NUMBER
#enditerate
#if TEST0
Lets test a true condition.
#iterate
#argument NUMBER 1 2 3 4 5 6 7 8 9
Lets test number NUMBER
#enditerate
#endif
#if TEST1
Lets test a false condition.
#iterate
#argument NUMBER 1 2 3 4 5 6 7 8 9
Lets test number NUMBER
#enditerate
#endif
Lets test stacked iterators
#iterate
#argument NUMBER1 1 2 3
#iterate
#argument NUMBER2 4 5 6
Lets test numbers NUMBER1 NUMBER2
#enditerate
#enditerate