Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: using <pre> tags for citing perldocs!

by ambrus (Abbot)
on Aug 02, 2010 at 20:27 UTC ( #852533=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://852533]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2022-01-21 20:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (59 votes). Check out past polls.

    Notices?