Re: PHP / libtidy / problem with output (line breaks)

"Arnaud Desitter" <[email protected]>
Newsgroups gmane.comp.web.html-tidy.user
Message-ID <[email protected]>
On 23/11/2007, Wolfgang Klinger <[email protected]> wrote:
>
> *hiya!*
>
> I use libtidy with PHP4 (libTidy Build Date: 1st December 2004)
> and have a problem.
>
> These are the options:
>
> 'doctype' => 'omit',
> 'show-body-only' => 1,
> 'output-xhtml' => 1,
> 'indent' => 0,
> 'drop-proprietary-attributes' => 1,
> 'wrap-attributes' => 0,
> 'wrap-sections' => 0,
> 'break-before-br' => 0,
> 'wrap' => 0
>
> Now if I let tidy parse the text
>
> -----
> A line outside.
> <p>Line 1<br />Line 2<br />Line 3</p>
> -----
> (without a line break)
>
> the output is
>
> -----
> A line outside.
> <p>Line 1<br />
> Line 2<br />
> Line 3</p>
> -----
>
>
> I found no option to change this behavior.

AFAIK, there isn't one. tidy is designed as a pretty-printer and therefore
has its own idea about good style. In this case, I think tidy's choice
is correct.
Regards,

> Unfortunately I can't work with the line break after each <br /> tag
> (it's the same with <li> and possibly other tags).
>
> Any help appreciated... :-)
>
>
> tia, bye
> Wolfgang
>
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.