-
Notifications
You must be signed in to change notification settings - Fork 429
Option to drop non-essential <html>, <head>, and <body> #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Try "tidy --hide-endtags yes". Despite the name, I think it causes all optional tags to be omitted, including start tags. |
Confirming that’s the case. Would you document this and/or change the name so this is obvious? |
Added http://w3c.github.com/tidy-html5/quickref.html#omit-optional-tags and rewrote http://w3c.github.com/tidy-html5/quickref.html#hide-endtags to read, "This option is an alias for omit-optional-tags." |
Thank you. One problem with this, in combination with -i, is that the indents are odd: towolf@ovo:~$ tidy -i -w 80 firstblush.html | head -n 22
line 9 column 1 - Warning: inserting implicit <body>
<!DOCTYPE html>
<html>
<head>
<title>firstblush</title>
<meta charset="utf-8">
<meta name="author" content="towolf">
<meta name="generator" content="pandoc">
<link rel="stylesheet" href="pandoc.css">
</head>
<body>
<header>
<h1 class="title">firstblush</h1>
<h2 class="author">towolf</h2>
<h3 class="date">01. März 2012</h3>
</header>
<p>Facilities to capture, process, analyse, modify, register, mix &
towolf@ovo:~$ tidy -i -omit -w 80 firstblush.html | head -n 22
line 9 column 1 - Warning: inserting implicit <body>
<!DOCTYPE html>
<title>firstblush</title>
<meta charset="utf-8">
<meta name="author" content="towolf">
<meta name="generator" content="pandoc">
<link rel="stylesheet" href="pandoc.css">
<header>
<h1 class="title">firstblush</h1>
<h2 class="author">towolf</h2>
<h3 class="date">01. März 2012</h3>
</header>
<p>Facilities to capture, process, analyse, modify, register, mix & |
Yeah, I see what you mean. I've never looked at the indenting code myself. Maybe somebody else will take an interest in it later. It seems to have a lot of quirks like the one you noticed. |
HTML5 without these tags validates, since they are implied. Could you add an option to drop these tags?
The text was updated successfully, but these errors were encountered: