-
Notifications
You must be signed in to change notification settings - Fork 435
Closed
Labels
Milestone
Description
Issue from https://lists.w3.org/Archives/Public/html-tidy/2018JanMar/0016.html
tidy -indent -wrap breaks <pre> formatting if the line is wrapped
<pre>a long line
</pre>when indented and wrapped ends up like this -
<pre>
a long line
</pre>The pre-formatted text shouldn't have leading spaces added. It should look like
<pre>
a long line
</pre>example: using tidy --version HTML Tidy for Cygwin version 5.6.0
run $ tidy -indent -wrap 78 --wrap-attributes yes --tidy-mark no
Input:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html><head><title>simple test case</title></head><body>
<div><div><div>
<PRE class="SCREEN">x1234567890123456789012345678901234567890123456789
</PRE >
</div></div></div>
</body></html>Output:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>simple test case</title>
</head>
<body>
<div>
<div>
<div>
<pre class="SCREEN">
x1234567890123456789012345678901234567890123456789
</pre>
</div>
</div>
</div>
</body>
</html>Regards,
Lee