Skip to content
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
Closed

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

sqlalchemy-bot opened this issue Feb 19, 2008 · 2 comments
Labels
bug Something isn't working lexer low priority

Comments

@sqlalchemy-bot
Copy link

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
Copy link
Author

Michael Bayer (@zzzeek) wrote:

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

@sqlalchemy-bot
Copy link
Author

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
Labels
bug Something isn't working lexer low priority
Projects
None yet
Development

No branches or pull requests

1 participant