[Privoxy-devel] tidy -indent -wrap can break <pre> formatting
Lee
ler762 at gmail.com
Mon Mar 19 16:42:24 UTC 2018
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 :)
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;
}
Lee
More information about the Privoxy-devel
mailing list