What's wrong with just using the HTML entities? Rather than using [cpan://File::Spec], just use <a href="http://search.cpan.org/search?mode=module&query=File%3A%3ASpec">File::Spec</a>. Or, instead of using magic <code> tags, just manually escape all the special characters in your code.

Someone made the horrific mistake of getting us hooked on this HTML-for-dummies approach of writing on this site, in ways that made sense for perl programmers. dragonchild's question is just along the same lines as everything else we have here to make our lives easier in things we do all the time (refer to documentation, CPAN, ISBNs, other nodes, other users, other sites, etc.). One thing we do all the time is put brackets (square brackets for those who prefer) in our text. It's not unreasonable to request it.

And I'm not sure it's a ridiculous amount of work. A significant amount of work, yes. But I'm not so sure about ridiculous. The amount of work is hugely dependant on the specification. If we need to now go and escape all backslashes, yes, that's ridiculous. Maybe more. If we come up with an idea that is a bit more compact, then it may not be nearly as bad. It's not as easy as, say, changing where doc:// tags or cpan:// tags point at. But it's just a matter of finding all the places that link handling is called, and mucking about with the substitution regular expression a bit.


In reply to Re^4: How to escape square bracket in PM? by Tanktalus
in thread How to escape square bracket in PM? by johnnywang

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.