Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels