Issue on --enclose-text and --enclose-block-text

Hi,

I'm currently trying to use tidy (HTML Tidy for Linux/x86 released on 25
March 2009).

I have an html file like this :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 25 March 2009), see www.w3.org" />
<title></title>
</head>
<body>
hello
<div class="summary">Hello again</div>
</body>
</html>


I'm using tidy with : tidy --enclose-text 1 --enclose-block-text 1 -q
 -asxhtml myfile.html

I'm getting this :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 25 March 2009), see www.w3.org" />
<title></title>
</head>
<body>
<p>hello</p>
<div class="summary">Hello again</div>
</body>
</html>

But I want the text in the DIV to be enclosed with <p> tags. Is it possible?

Thanks a lot,

Julien.

Received on Tuesday, 23 October 2012 18:11:02 UTC