Skip to content

Folding incorrect for Python scripts in ASP HTML #235

@nyamatongwe

Description

@nyamatongwe

The following ASP example ends with a negative fold level.

<%@language=python%>
<%
pass
%>

Script line 2 <% increments the fold level to base+1.
Python folding is based on indentation so is base for line 3 pass.
Line 4 %> decrements the fold level to base-1.

The example is the simplest case but all Python scripts show this problem.

For this scheme to work, the fold level from Python indentation and the fold level from tag nesting should be calculated independently then added together.

This problem occurs for both server-side (ASP) and client-side Python scripts. There are other forms of server-side Python but folding is specifically disabled for Mako. Client-side Python has never been popular so doesn't need to be fixed.

python.asp.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    aspCaused by ASP or ASP.NET for the html lexerhtmlCaused by the hypertext lexer

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions