diff --git a/autotests/folding/highlight.jsp.fold b/autotests/folding/highlight.jsp.fold
--- a/autotests/folding/highlight.jsp.fold
+++ b/autotests/folding/highlight.jsp.fold
@@ -25,15 +25,18 @@
A Sample Jsp
-
+ }
+ //-->>
+
<%-- The top label table. --%>
@@ -86,22 +89,22 @@
<%-- Display our list of random Integers (shows code folding). --%>
<%
- if (intList != null && intList.size() > 0) {
+ if (intList != null && intList.size() > 0) {
%>
Here are the elements of intList... |
<%
Iterator intListIt = intList.iterator();
- while (intListIt.hasNext()) {
+ while (intListIt.hasNext()) {
Integer i = (Integer) intListIt.next();
%>
<%=i.toString()%> |
<%
- }
- } else {
+ }
+ } else {
%>
Oooops, we forgot to initialize intList! |
<%
- }
+ }
%>
@@ -139,7 +142,7 @@
<%!
- /* A place for class variables and functions... */
+ /* A place for class variables and functions... */
// Define some sample parameter names that this page might understand.
private static final String PARAMETER_1 = "p1";
@@ -149,22 +152,22 @@
private static final String PARAMETER_5 = "p5";
// Returns str trimmed, or an empty string if str is null.
- private static String noNull(String str) {
+ private static String noNull(String str) {
String retStr;
if (str == null)
retStr = "";
else
retStr = str.trim();
return retStr;
- }
+ }
// Returns a list of Integers with listSize elements.
- private static List getIntList(int listSize) {
+ private static List getIntList(int listSize) {
ArrayList retList = new ArrayList(listSize);
for (int i = 0; i < listSize; i++)
retList.add(new Integer( (int) (Math.random() * 100) ));
return retList;
- }
+ }
%>
diff --git a/autotests/html/highlight.jsp.html b/autotests/html/highlight.jsp.html
--- a/autotests/html/highlight.jsp.html
+++ b/autotests/html/highlight.jsp.html
@@ -7,39 +7,42 @@
<%--
This page won't actually work, as it is simply designed to display jsp syntax highlighting.
--%>
-<%@ page info="A Page to Test Kate Jsp Syntax Highlighting" language="java" errorPage="/test-error-page.jsp"%>
-<%@ include file="/include/myglobalvars.jsp"%> --%>
-<%@ page import="java.util.*,
+<%@ page info="A Page to Test Kate Jsp Syntax Highlighting" language="java" errorPage="/test-error-page.jsp"%>
+<%@ include file="/include/myglobalvars.jsp"%> --%>
+<%@ page import="java.util.*,
java.io.*,
- java.math.*" %>
-<%@ taglib uri="/WEB-INF/lib/si_taglib.tld" prefix="si"%>
-<jsp:useBean id="aPageBean" scope="page" class="my.package.MyPageBean"/>
-<jsp:useBean id="aRequestBean" scope="request" class="my.package.MyRequestBean"/>
-<%
+ java.math.*" %>
+<%@ taglib uri="/WEB-INF/lib/si_taglib.tld" prefix="si"%>
+<jsp:useBean id="aPageBean" scope="page" class="my.package.MyPageBean"/>
+<jsp:useBean id="aRequestBean" scope="request" class="my.package.MyRequestBean"/>
+<%
// We can decipher our expected parameters here.
- String parm1 = noNull(request.getParameter(PARAMETER_1)).trim();
- String parm2 = noNull(request.getParameter(PARAMETER_2)).trim();
- String parm3 = noNull(request.getParameter(PARAMETER_3)).trim();
- String parm4 = noNull(request.getParameter(PARAMETER_4)).trim();
- String parm5 = noNull(request.getParameter(PARAMETER_5)).trim();
+ String parm1 = noNull(request.getParameter(PARAMETER_1)).trim();
+ String parm2 = noNull(request.getParameter(PARAMETER_2)).trim();
+ String parm3 = noNull(request.getParameter(PARAMETER_3)).trim();
+ String parm4 = noNull(request.getParameter(PARAMETER_4)).trim();
+ String parm5 = noNull(request.getParameter(PARAMETER_5)).trim();
// A sample collection of Integers to display some code folding.
- List intList = getIntList(10);
+ List intList = getIntList(10);
-%>
+%>
<html>
<title>A Sample Jsp</title>
<head>
- <script language="javascript"><!--
- function doAlert1() {
- alert("This is the first javascript example.");
- }
-
- function doAlert2() {
- alert("This is the second javascript example.");
- }
- //--></script>
+ <script language="javascript"><!--
+ function doAlert1() {
+ alert("This is the first javascript example.");
+ }
+
+ function doAlert2() {
+ alert("This is the second javascript example.");
+ }
+ //--></script>
+ <style type="text/css">
+ body{ color: yellow; }
+ </style>
</head>
<body>
<%-- The top label table. --%>
@@ -54,61 +57,61 @@
<%-- Label; Actual Parameter String; Value Detected --%>
<tr>
<td><b>PARAMETER_1</b></td>
- <td align="center"><%=PARAMETER_1%></td>
- <td align="right">"<%=parm1%>"</td>
+ <td align="center"><%=PARAMETER_1%></td>
+ <td align="right">"<%=parm1%>"</td>
</tr>
<%-- Label; Actual Parameter String; Value Detected --%>
<tr>
<td><b>PARAMETER_2</b></td>
- <td align="center"><%=PARAMETER_2%></td>
- <td align="right">"<%=parm2%>"</td>
+ <td align="center"><%=PARAMETER_2%></td>
+ <td align="right">"<%=parm2%>"</td>
</tr>
<%-- Label; Actual Parameter String; Value Detected --%>
<tr>
<td><b>PARAMETER_3</b></td>
- <td align="center"><%=PARAMETER_3%></td>
- <td align="right">"<%=parm3%>"</td>
+ <td align="center"><%=PARAMETER_3%></td>
+ <td align="right">"<%=parm3%>"</td>
</tr>
<%-- Label; Actual Parameter String; Value Detected --%>
<tr>
<td><b>PARAMETER_4</b></td>
- <td align="center"><%=PARAMETER_4%></td>
- <td align="right">"<%=parm4%>"</td>
+ <td align="center"><%=PARAMETER_4%></td>
+ <td align="right">"<%=parm4%>"</td>
</tr>
<%-- Label; Actual Parameter String; Value Detected --%>
<tr>
<td><b>PARAMETER_5</b></td>
- <td align="center"><%=PARAMETER_5%></td>
- <td align="right">"<%=parm5%>"</td>
+ <td align="center"><%=PARAMETER_5%></td>
+ <td align="right">"<%=parm5%>"</td>
</tr>
</table>
<br><br>
<%-- Display our list of random Integers (shows code folding). --%>
<table width="400" cellpadding="0" cellspacing="0" border="0">
-<%
- if (intList != null && intList.size() > 0) {
-%>
+<%
+ if (intList != null && intList.size() > 0) {
+%>
<tr><td><b>Here are the elements of intList...</b></td></tr>
-<%
- Iterator intListIt = intList.iterator();
- while (intListIt.hasNext()) {
- Integer i = (Integer) intListIt.next();
-%>
- <tr><td><%=i.toString()%></td></tr>
-<%
+<%
+ Iterator intListIt = intList.iterator();
+ while (intListIt.hasNext()) {
+ Integer i = (Integer) intListIt.next();
+%>
+ <tr><td><%=i.toString()%></td></tr>
+<%
}
} else {
-%>
+%>
<tr><td><font color="blue"><b><i>Oooops, we forgot to initialize intList!</i></b></font></td></tr>
-<%
+<%
}
-%>
+%>
</table>
<br><br>
@@ -136,42 +139,42 @@
<br><br>
<%-- Expression language. --%>
<table width="400" cellpadding="0" cellspacing="0" border="0">
- <c:if test="${!empty param.aParam}">
- <c:set var="myParam" scope="session" value="${param.aParam}"/>
+ <c:if test="${!empty param.aParam}">
+ <c:set var="myParam" scope="session" value="${param.aParam}"/>
</c:if>
- <tr><td>myParam's value: "<c:out value="${myParam}" default=="Default"/>"</td></tr>
+ <tr><td>myParam's value: "<c:out value="${myParam}" default=="Default"/>"</td></tr>
</table>
</body>
</html>
-<%!
+<%!
/* A place for class variables and functions... */
// Define some sample parameter names that this page might understand.
- private static final String PARAMETER_1 = "p1";
- private static final String PARAMETER_2 = "p2";
- private static final String PARAMETER_3 = "p3";
- private static final String PARAMETER_4 = "p4";
- private static final String PARAMETER_5 = "p5";
+ private static final String PARAMETER_1 = "p1";
+ private static final String PARAMETER_2 = "p2";
+ private static final String PARAMETER_3 = "p3";
+ private static final String PARAMETER_4 = "p4";
+ private static final String PARAMETER_5 = "p5";
// Returns str trimmed, or an empty string if str is null.
- private static String noNull(String str) {
- String retStr;
+ private static String noNull(String str) {
+ String retStr;
if (str == null)
retStr = "";
else
- retStr = str.trim();
+ retStr = str.trim();
return retStr;
}
// Returns a list of Integers with listSize elements.
- private static List getIntList(int listSize) {
- ArrayList retList = new ArrayList(listSize);
+ private static List getIntList(int listSize) {
+ ArrayList retList = new ArrayList(listSize);
for (int i = 0; i < listSize; i++)
- retList.add(new Integer( (int) (Math.random() * 100) ));
+ retList.add(new Integer( (int) (Math.random() * 100) ));
return retList;
}
-%>
+%>