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.
The following ASP example ends with a negative fold level.
Script line 2
<%
increments the fold level tobase+1
. Python folding is based on indentation so isbase
for line 3pass
. Line 4%>
decrements the fold level tobase-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