jankatins / knitpy

knitpy: Elegant, flexible and fast dynamic report generation with python
https://github.com/jankatins/knitpy
Other
368 stars 29 forks source link

Fix execution of loops #18

Closed jankatins closed 9 years ago

jankatins commented 9 years ago

Before, a loop with more than one inner code line, was only executing the first line in a loop as that was tagged as "valid python" and executed and then the second line was executed (which is valid as a single line can have more spaces in front of it without being in a loop...

Fix this by looking at the next line if this line has the same number of spaces (or is a comment/empty line).

Closes: #15