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

On 23/11/2007, Wolfgang Klinger <wolfgang@wazum.com> 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
>
>
>
>

Received on Saturday, 24 November 2007 10:29:15 UTC