Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: TOC draft sample

by pryrt (Monsignor)
on Nov 09, 2017 at 14:36 UTC ( #1203039=note: print w/replies, xml ) Need Help??


in reply to TOC draft sample

Not related to the TOC, but while we're talking about editing this page anyway... Do we really still want to recommend never using <PRE>? Because, as per Re: Non asci character and system call and its followup, and has been seen elsewhere (for example, here), if you want to include non-ASCII in your code snippet, you need to use <PRE>. So, possibly something like:


CODE vs PRE

At first blush, the <pre> ...</pre> pair may look like an alternative to code tags... BUT DON'T USE IT HERE chiefly because <pre> ...</pre> tags will not persuade the Monastery to provide a download link for the contents of the <pre>... and while it is now supposed to wrap lines that are too long for the viewer's browser window, there are ways Monks could use CSS that would defeat that. So, please, don't use <pre> ...</pre>.

Exception: non-ASCII characters inside the <code>...</code> may magically display as unrendered entities instead of the character you expected, whereas inside <pre> ...</pre>, they work as expected. For example,

<code>
$checkmarks="☐☑☒✓✗";
...
</code>

will render as

$checkmarks="&#9744;&#9745;&#9746;&#10003;&#10007;"; ...

whereas

<pre>
$checkmarks="☐☑☒✓✗";
...
</pre>

will render as

$checkmarks="☐☑☒✓✗";
...

Other Tags You Should NOT Use


update 1: renamed the section and fixed paragraphing, plus made the CODE multiline, so it properly renders with the download-link

update 2: clarified the text to explicitly say that PRE should be used in the case of non-ASCII

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2020-10-26 04:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (250 votes). Check out past polls.

    Notices?