[Privoxy-devel] tidy -indent -wrap can break <pre> formatting
Fabian Keil
fk at fabiankeil.de
Tue Mar 20 08:05:33 UTC 2018
Lee <ler762 at gmail.com> wrote:
> On 3/18/18, Fabian Keil <fk at fabiankeil.de> wrote:
> > Lee <ler762 at gmail.com> wrote:
> >
> >> On 3/17/18, Fabian Keil <fk at fabiankeil.de> wrote:
> >> > Lee <ler762 at gmail.com> wrote:
> >> >
> >> >> On 3/15/18, Fabian Keil <fk at fabiankeil.de> wrote:
> >> >> > Lee <ler762 at gmail.com> wrote:
> >> >> >>
> >> >> >> Just how much manual editing did you do to the generated .html
> >> >> >> files?
> >> >> >
> >> >> > I generally didn't manually edit the HTML files.
> >> >>
> >> >> Why use tidy then? Seems like the only reason to make the html
> >> >> files human-readable (the docbook sgml -> html results are pretty
> >> >> horrible to look at) would be to edit them.
> >> >
> >> > tidy is used to turn the pages into valid HTML.
> >> >
> >> > At least in the past the Docbook toolchain wasn't
> >> > able to generate valid HTML by itself.
> >>
> >> I've been feeding the docbook generated html to the w3 validator
> >> https://validator.w3.org/#validate_by_upload
> >> and so far the only error has been tables inside of paragraphs.
> >> Apparently this is an error:
> >> <p><table> ... </table></p>
> >> Error: No p element in scope but a p end tag seen.
> >>
> >> Quick test: remove a <para> from around a <programlisting> in
> >> developer.sgml <!-- para _LR_ -->
> >> <programlisting>
> >> /* This is not a local include, but requires a path element. */
> >> #include <sys/fileName.h>
> >> </programlisting>
> >> <!-- /para _LR_ -->
> >>
> >> make dok & the validator now reports one less error.
> >>
> >> I can work on removing <para>s from around elements that get turned
> >> into <table> if you'd like
> >
> > Sounds good to me.
>
> OK - most of the doc/webserver html files validate now :)
Great.
> There's some weirdness with includes that I don't understand along
> with some docbook markup that I don't understand, so I left that stuff
> alone. I don't know how much longer it's going to take me to figure
> out how to fix the remaining problems, so I committed what I had.
>
> I didn't want to mess with utils/changelog2doc.pl, but
> <para><itemizedlist> ... </itemizedlist></para>
> generates invalid html, so wrap_in_para_itemlist_markup shouldn't be
> inserting <para>s:
>
> sub wrap_in_para_itemlist_markup($) {
> my $content = shift;
> my $markup = "<para>\n" .
> " <itemizedlist>\n" .
> " $content" .
> " </itemizedlist>\n" .
> "</para>\n";
> return $markup;
> }
I'll look into this the next time I use it.
Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.privoxy.org/pipermail/privoxy-devel/attachments/20180320/794df23c/attachment.bin>
More information about the Privoxy-devel
mailing list