I modified my local copy of FrameChat2 (v. 2.04) to use the <c></c> shortcut for <code></code> tags. Below is the diff (`diff -u framechat.pl framechat.pl.ori` - the unmodified version being named framechat.pl.ori). I cannot recall, though, if I had modified it previously in a way that would result in differing line numbers. Thought maybe it might prove helpful to someone, though.

--- framechat.pl.ori Sat Jun 11 16:41:08 2005 +++ framechat.pl Sat Jun 11 17:41:16 2005 @@ -126,6 +126,7 @@ '[http://] ', '[ftp://] ', '<code>&lt;/code> ', +'<c>&lt;/c> ', '<tt></tt> ', '<a href=""></a> ', '/ignore ', @@ -912,6 +913,8 @@ $content=~s/<code>(.*?)<\/code>/codefix($1)/eig; # encodes the code +and changes pairs of balanced 'code' tags to 'ccc' $content=~s/(<\/?code>)/encode_entities($1)/eig; # nuke unbalanced c +ode tags + $content=~s/<c>(.*?)<\/c>/codefix($1)/eig; # encodes the c tag and c +hanges pairs of balanced 'c' tags to 'ccc' + $content=~s/(<\/?c>)/encode_entities($1)/eig; # nuke unbalanced c ta +gs $content=~s/<ccc>/<code>/ig; # restore <ccc> $content=~s/<\/ccc>/<\/code>/ig; # restore </ccc> @@ -967,10 +970,10 @@ } if(($i{'n'} && $i{'n'} =~ /^hist|(?:view|search) history$/) || $i{'hi +stbyauth'}){ - $content=~s/(<(?!(a\s|tt>|code>|i>|\/a>|\/tt>|\/code>|\/i>)))/encode +_entities($1)/eig; # only allow a, tt, i & code tags + $content=~s/(<(?!(a\s|tt>|code>|c>|i>|\/a>|\/tt>|\/code>|\/c>|\/i>)) +)/encode_entities($1)/eig; # only allow a, tt, i & code/c tags } else{ - $content=~s/(<(?!(a\s|tt>|code>|\/a>|\/tt>|\/code>)))/encode_entitie +s($1)/eig; # or only allow a, tt & code tags + $content=~s/(<(?!(a\s|tt>|code>|c>|\/a>|\/tt>|\/code>|\/c>)))/encode +_entities($1)/eig; # or only allow a, tt & code/c tags } return $content; }

In reply to Re: c tags by atcroft
in thread c tags by demerphq

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.