Skip to content

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

@sqlalchemy-bot

Description

@sqlalchemy-bot

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:
                        '#'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions