Re: Faq format
Steffen Daode Nurpmeso <[email protected]>
| Newsgroups | gmane.os.openbsd.www |
|---|---|
| Message-ID | <4fb57578.fa+gzolF/[email protected]> |
Heya, one from the higher place! Niko Gonzales <[email protected]> wrote: |Hey, | |Just wondering what you guys use to generate your FAQ pages b do you edit them |by hand? Or have some automated way of generating them? I'd like to generate |some of my own for my University's documentation. | |Thanks! | |Niko Gonzales |University of Denver |Linux/UNIX Systems Engineer |[email protected] |http://www.du.edu/uts/ |[cid:B5BB9927-8E19-4944-A898-6CDE9DF6B557] It's all dirty handwork. (I don't dare to say craftsmanship here.) If you do it yourself, be aware that today even non-visible whitespace will create (completely useless) DOM objects! So better write </strong ></p> instead of </strong> </p> I.e., something like the following is highly desirable: if ($raw) { print($last_line, "\x0A") if $last_line; $last_line = undef; print $line, "\x0A"; } else { if ($last_line && $last_line =~ />$/ && $line =~ /^</) { $last_line .= $line; } else { print($last_line, "\x0A") if $last_line; $last_line = (length $line > 0) ? $line : undef; } } (That doesn't catch all but it works for my private usage case, where it ends up with two useless whitespace DOM objects per generated XHTML page for normal cases, and of course without any manual adjustments, say.) Is Bobby Ewing still alive?? I remember my mum generating very interesting sounds once he came out of the shower again (*i* read *that* in the newspaper the next day). --steffen Forza Figa!