faq2html 1.36

faq2html is the program I use to turn various text files into web pages.

I've started adopting CPAN::Changes::Spec for my Perl modules, and changes files in that format look best if shown in a dense bullet list similar to:

 - Remove single spaces at the start of lines in wrapped paragraphs.
 - Encode output in UTF-8 if necessary.
 - Strip formatting codes from headings that will go into the table of
   contents or navbar, and fix the algorithm for adding anchors to account
   for this transformation.
 - Use Module::Build as the build system.

faq2html could deal with these if every line was its own bullet, but couldn't handle line continuations, so the output looked poor. This new release fixes that problem (in a somewhat overly complex way, but I'll wait to fix that until I start refactoring it, which is on the menu for a future project).

Note that there is a remaining ambiguity. When there is a blank line between bullet items, I prefer to wrap the text of each bullet in <p> to preserve that spacing (even though that makes the output look awful in the Dreamwidth style that I use and in the original style, due to a bug on their end I think). But if that's the entirety of the list, which can happen with Changes files, I'd prefer to omit the <p>. That requires defering output of the bullet point until either more paragraphs that are part of the same list are seen, or some other text is seen. That's a larger refactoring that I'll put off until later.

I also released cvs2xhtml version 1.15 and cl2xhtml version 1.12. There are no changes in the output of either of those programs; I just ported them to Python 3, since I've uninstalled Python 2 from my systems.

You can get all of these tools from my web tools distribution page.

Posted: 2021-03-27 19:56 — Why no comments?

Last spun 2022-02-06 from thread modified 2021-03-28