W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2008

End-tag of script element is not indented

From: Kauker, Hubert <Hubert.Kauker@travelbasys.de>
Date: Fri, 24 Oct 2008 10:30:20 +0200
Message-ID: <47CEFD79750B0A4FA01C60600C0CD76308190C2A@sds-ex-mh04.stinnes.de>
To: "'html-tidy@w3.org'" <html-tidy@w3.org>
When I am using --indent auto, then the end tag of a SCRIPT element is not
indented in case the src attribute is used and no script code is included in
the element.

What can I do to get the end tag indented correctly?

Or is there a way to keep the end tag on the same line as the start tag?
This would make the output a bit more acceptable.

Hubert

E x a m p l e : 
 
C>tidy -version
HTML Tidy for Windows released on 11 August 2008

C>tidy --indent auto test1.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
  <meta name="generator" content=
  "HTML Tidy for Windows (vers 11 August 2008), see www.w3.org">

  <title>Script Tag Test 1</title>
  <script type="text/javascript">
var x = null;
  </script>
  <script type="text/javascript" src="test.js">
</script>
</head>

<body>
  <h1>Script Tag Test 1</h1>
</body>
</html>
Received on Monday, 27 October 2008 09:40:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:59 GMT