Fix the unexpected error that occurs when an empty control block is used.
Fixes: https://github.com/sqlalchemy/mako/issues/146
When the first control block is empty or comment, the correct result will now be rendered.
from mako.template import Template
template = r"""
% if False:
% elif False:
% else:
test
% endif
"""
t = Template(template)
print(t.render())
Result:
test
cool.
can we add changelog files to these patches? Dont worry about getting them perfect I can fix them up later
example
https://github.com/sqlalchemy/mako/commit/1d6c58e7124653bc11b0a4f153bdbaab41622854#diff-22252f506a8da7ab5343802f53f7c35770390f669fe0f73a9e2345f0914ebb98
New Gerrit review created for change d0a0981a379ac7a2b8a8e7db6344ed82425ae5b2: https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/5148
Ok, it has been updated.
Patchset 571a73a1d84ee922b38ce5817a5822fbe0268cd0 added to existing Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/5148
Thanks so much for your help! Everything's been updated now.
Patchset fb257ff866148a79bfe58ccaf7c98f499f8d8424 added to existing Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/5148
Michael Bayer (zzzeek) wrote:
graet, thanks
View this in Gerrit at https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/5148
Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/5148 has been merged. Congratulations! :)