Ah, this is quite a nasty bug to fix :)
Originally we just looked if the line started with return, however the
following line of code would then fail...
{{ if True: return }}
I sent a patch to Massimo, would you mind testing again when he applies it?
--
Thadeus
On Sat, May 15, 2010 at 3:06 PM, Praneeth <[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello all,
>
> The lines 291 through 293 of gluon/template.py check for the string
> 'return' in line. This misinterprets the javascript returns present in
> the line as those of python and unindents the next lines in the
> template, Causing a problem when the javascript return is in the python
> if block of the template.
>
> This broke one of the Sahana-Eden templates :
>
> http://bazaar.launchpad.net/~lifeeth/sahana-eden/trunk/annotate/head:/views/sahana_scripts_min.html
> - -> line 71-81 serve as an example that breaks with the above template.py.
>
>
> - --
> Praneeth
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJL7v7CAAoJENaaLQPAdAyuFQIIAKN69uXTnCwPICjsx3TnQTm1
> p/ufS2U9sphdTuhqA2Ief/rHBN8Z5S0eHG9zx0Yps01RvNWM01NW9tvPq5RImVbs
> B9oMJd5mNT6ZbEzoArA+d2s8WEEX0iHjJwW4Uh3r4EDHHPjEzHpafxBtQyrqmdko
> qulpaKCj0ftBPjz/Uzfd0fcifK719UNmavn/HpjNq70rSlYs+Txe1zYwo2xgqHai
> B+Zwev1d66NhT9ffc2pSzZQNKeGbf4qDh60snNmgWGppfiBbEwmga0riAV4wgp54
> FMvPX7EJXOfkqrioLMOSPLWmdsCMsIn1MUwad43NPieYIJFeMlyNCD0tL3hlAN0=
> =u9LQ
> -----END PGP SIGNATURE-----
>