in reply to using <pre> tags for citing perldocs!

Come on, perldoc can't only be viewed as a roffed (for a particular screen width) manpage. Why would you force a particular line breaking to the viewer? It's better if their browser does that.

Converting to html is a better approximation: lists come out fine, but isn't perfect, because code blocks will be converted to pre tags then. Maybe we should have a custom pod2perlmonks converter that is based on the html converter?

  • Comment on Re: using <pre> tags for citing perldocs!

Replies are listed 'Best First'.
Re^2: using <pre> tags for citing perldocs! (no, no, please, no)
by tye (Sage) on Aug 02, 2010 at 22:23 UTC

    Like any text you post to PerlMonks, the answer is quite simple:

    • Put <p>...</p> around non-code paragraphs
    • Put <c>..</c> around code blocks.

    That covers 95% of likely POD to be pasted and is very little work. Preserving links or emphasis is often not an issue and is only a little more effort when warranted.

    Update: And then enclose the whole range in <blockquote>...</blockquote> to indent it apart from the rest of your node, of course.

    - tye        

Re^2: using <pre> tags for citing perldocs!
by LanX (Sage) on Aug 02, 2010 at 20:55 UTC
    Sure, but people use cut&paste for inserting quotes, how do you want to combine this with html-formatting?

    Cheers Rolf

    UPDATE: hmm ... one could use JS to get the HTML of the selection.