Closed
Description
Given this input file:
<!doctype html>
<html>
<head>
<title>test</title>
<link href="foo.css" media="screen" rel="stylesheet" type="text/css">
<script type="text/javascript" src="bar.js"></script>
</head>
<body>
</body>
</html>
I'll run tidy like this:
tidy --indent yes --indent-spaces 4 --wrap 0 --quiet yes --tidy-mark no test.html
And get:
<!DOCTYPE html>
<html>
<head>
<title>
test
</title>
<link href="foo.css" media="screen" rel="stylesheet" type="text/css">
<script type="text/javascript" src="bar.js">
</script>
</head>
<body>
</body>
</html>
Note that the closing script tag is wrapped but not indented. If I put a comment inside the tags:
<!doctype html>
<html>
<head>
<title>test</title>
<link href="foo.css" media="screen" rel="stylesheet" type="text/css">
<script type="text/javascript" src="bar.js"><!-- nothing --></script>
</head>
<body>
</body>
</html>
Then I'll get this:
<!DOCTYPE html>
<html>
<head>
<title>
test
</title>
<link href="foo.css" media="screen" rel="stylesheet" type="text/css">
<script type="text/javascript" src="bar.js">
<!-- nothing -->
</script>
</head>
<body>
</body>
</html>
I'm thinking that the closing script tag should either not wrap at all (in the case where there's no content) or wrap and be indented to match the opening tag.
Thanks.
Metadata
Metadata
Assignees
Labels
No labels