[Privoxy-devel] tidy -indent -wrap can break <pre> formatting
Ian Silvester
iansilvester at fastmail.fm
Tue Mar 13 00:26:08 UTC 2018
Thanks for the hint, and yeah, 132x35 here.
My PGP public key[http://silvester.org.uk/IanSilvesterPGPPublicKey.asc]
On Mon, 12 Mar 2018, at 16:47, Lee wrote:
> I'm trying to add a FAQ entry and I just can't get the formatting
> right. Turns out the problem is with tidy indent + wrap: short lines
> don't get screwed up, long lines are split after <pre> and indented
>
> Anyone have a problem with changing the line in GNUmakefile.in
> TIDY = tidy -modify -indent -wrap 78 --tidy-mark no
> to -wrap 120
>
> And a related question - what's your default window size? I use 132x24
> Why limit line lengths to less than 80 characters?
>
>
> test case:
> $ cat doit
> #!/bin/sh
> cp tidy-stc tidy-stc.html
> cat tidy-stc.html
> echo " ---------- "
> tidy -q -modify -indent -wrap 78 --tidy-mark no tidy-stc.html
> echo " ---------- "
> cat tidy-stc.html
>
> $ ./doit
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
> Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
> <html><head><title>simple test case</title></head><body>
> <TABLE
> BORDER="0"
> BGCOLOR="#E0E0E0"
> WIDTH="100%"
> ><TR
> ><TD
> ><PRE class="SCREEN"
> >1234567890123456789012345678901234567890123456789
> </PRE
> ></TD
> ></TR
> ></TABLE
> >
> </body></html>
> ----------
> line 3 column 2 - Warning: <table> lacks "summary" attribute
> ----------
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <title>simple test case</title>
> </head>
> <body>
> <table border="0" bgcolor="#E0E0E0" width="100%">
> <tr>
> <td>
> <pre class="SCREEN">1234567890123456789012345678901234567890123456789
> </pre>
> </td>
> </tr>
> </table>
> </body>
> </html>
>
> $
>
> And everything looks good.
> Now add another character to the class="SCREEN" line:
>
> $ ./doit
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
> Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
> <html><head><title>simple test case</title></head><body>
> <TABLE
> BORDER="0"
> BGCOLOR="#E0E0E0"
> WIDTH="100%"
> ><TR
> ><TD
> ><PRE class="SCREEN"
> >12345678901234567890123456789012345678901234567890
> </PRE
> ></TD
> ></TR
> ></TABLE
> >
> </body></html>
> ----------
> line 3 column 2 - Warning: <table> lacks "summary" attribute
> ----------
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <title>simple test case</title>
> </head>
> <body>
> <table border="0" bgcolor="#E0E0E0" width="100%">
> <tr>
> <td>
> <pre class="SCREEN">
> 12345678901234567890123456789012345678901234567890
> </pre>
> </td>
> </tr>
> </table>
> </body>
> </html>
>
> and the pre-formatted text is indented way too far
>
> Lee
> _______________________________________________
> Privoxy-devel mailing list
> Privoxy-devel at lists.privoxy.org
> https://lists.privoxy.org/mailman/listinfo/privoxy-devel
More information about the Privoxy-devel
mailing list