The new tidy (libtidy5) is great, but i can't figure out to reformat an html file with every tag on a newline so, also inline tags.
This is standard output:
echo "<p><b>Hi</b><i>Tom</i></p>" | tidy -i
<!DOCTYPE html>
<html>
<head>
<meta name="generator" content=
"HTML Tidy for HTML5 for Linux version 5.2.0">
<title></title>
</head>
<body>
<p><b>Hi</b><i>Tom</i></p>
</body>
</html>
What I want is this ouput:
<html>
<head>
<meta name="generator" content=
"HTML Tidy for HTML5 for Linux version 5.2.0">
<title></title>
</head>
<body>
<p>
<b>Hi</b>
<i>Tom</i>
</p>
</body>
</html>
Is there a CLI parameter to do that?
(Don't like the workaround to define every html element as a block element, Would be nice if you can easily reformat between normal and all block)
Output as xml comes close:
So:
Or
--output-xml 1