by Mofi » Fri Aug 06, 2010 1:05 am
Which version of UltraEdit do you use, v16.10.0.1036?
The code folding feature works fine for my valid HTML files encoded in ANSI using character set "iso-8859-1", except for one file which contains blocks like this:
<table cellspacing=0 summary="Beispiel für Befehl ME">
<tr><td>Anfrage:</td>
<td><span class="reb">:</span><span class="db">0A</span><span class="veid">TEST</span><!--
//--><span class="or">ME</span>0000<span class="pi">6E</span></td>
</tr><tr><td>Antwort: </td>
<td><span class="reb">:</span><span class="db">0E</span><span class="veid">TEST</span><!--
//--><span class="or">ME</span>00000001<span class="pi">AD</span></td>
</tr></table>
The block comment starting at end of a line and immediately ending on start of the next line to be able to well format the long string in the HTML file without resulting in displaying the line ending as space character confuses the code folding engine of UltraEdit. With HTML block comments used "normally" there is no problem.
Of course the HTML file must be valid which means for every block element starting tag there must be also a block element ending tag. Further in HTML 4.01 it is for some block elements like <li> or <td> valid to omit the end tag </li> or </td> which is not allowed when using XHTML and of course is also for HTML not really good. If block ending tags are omitted, the code folding engine fails. For example following HTML code is no problem for the code folding engine.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Code Folding test</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
</head>
<body>
<ul>
<li>Multi-line
list item
in a bulleted list.</li>
<li>Two line list item
in a bulleted list.</li>
<li>Single line list item in a bulleted list.</li>
</ul>
</body>
</html>
But if </li> is omitted, code folding fails although the HTML file is still a valid HTML file.