New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in code generation with """#""" line #75

Closed
sqlalchemy-bot opened this Issue Feb 19, 2008 · 2 comments

Comments

Projects
None yet
1 participant
@sqlalchemy-bot

sqlalchemy-bot commented Feb 19, 2008

Migrated issue, originally created by Anonymous

Hello

This template works ok:

<%
	if True:
		"#"
	elif False:
		'#'
%>

but this returns invalid syntax (!SyntaxError) at elif:

<%
	if True:
		"""#"""
	elif False:
		'#'
%>

when we switch elif to if, then compiled template will look like this:

def render_body(context,**pageargs):
    context.caller_stack.push_frame()
    try:
        __M_locals = dict(pageargs=pageargs)
	.....
        if True:
                """#"""
                if False:
                        '#'
@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Feb 21, 2008

Michael Bayer (@zzzeek) wrote:

well that was painful. I had to rewrite the "whitespace formatter" for this, fixed in 3a31591.

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Feb 21, 2008

Changes by Michael Bayer (@zzzeek):

  • changed status to closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment