You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears tidy does not preserve spaces in in <pre> and <code> tags. It renders the entire tag contents as a single line, destroying code formatting.
$ HTML_TIDY=/dev/null tidy -q <<EXAMPLE
<pre>
<code>
if (true) {
return false;
}
</code>
</pre>
EXAMPLE
<!DOCTYPE html>
<html>
<head>
<meta name="generator" content=
"HTML Tidy for HTML5 for Linux version 5.9.14">
<title></title>
</head>
<body>
<pre>
<code> if (true) { return false; } </code>
</pre>
</body>
</html>
I scoured the manuals for an option that would fix this but found none. The closest would be --literal-attributes but using it did not work, as expected.
The text was updated successfully, but these errors were encountered:
It appears tidy does not preserve spaces in in
<pre>
and<code>
tags. It renders the entire tag contents as a single line, destroying code formatting.I scoured the manuals for an option that would fix this but found none. The closest would be
--literal-attributes
but using it did not work, as expected.The text was updated successfully, but these errors were encountered: