Reputation: 3854
I am trying to use HTMLTIDY for indenting my html file. I am using the command line version of it.
tidy --doctype html5 --tidy-mark no --indent auto --indent-spaces 4 --wrap 0 --write-back yes --output-html yes --drop-empty-elements no filename.html
Its indenting everything properly except the script tags and inline elements are coming in the same line instead of indenting.
Before:
<!DOCTYPE html><html><head>
<script type="text/javascript" src="something.js"></script>
<script type="text/javascript" src="something.js"></script>
<script type="text/javascript" src="something.js"></script>
<title>sometitle</title>
</head><body><div class="test"><a href="#">testlink1</a><a href="#">testlink1</a><a href="#">testlink1</a></div></body>
</html>
after:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="something.js">
</script>
<script type="text/javascript" src="something.js">
</script>
<script type="text/javascript" src="something.js">
</script>
<title>sometitle</title>
</head>
<body>
<div class="test">
<a href="#">testlink1</a><a href="#">testlink1</a><a href="#">testlink1</a>
</div>
</body>
</html>
I am unable to figure out any options as per the documention to fix it. please help me solving this.
Upvotes: 4
Views: 1052
Reputation: 19644
balthisar commented on 1 Feb:
Fixed in develop-500. Please feel free to re-open this if you still have a problem. Thanks!
Upvotes: 2