I like that; in addition to letting the user decide whether they get any highlighting/JS. It sort of has to be author controlled anyway because the author would need to choose what the code snippet syntax was -- Perl, SQL, XHTML, etc.
Style attributes -- like <c style="whatever">snippet</c> -- probably shouldn't be supported because it would add a bunch of sanitization parsing if it's literal HTML style and plain old parsing/logic if it's not real HTML. Classes would be easy and innocuous. <c class="xhtml">snippet</c>. Or, in the spirit of <c/> pseudo-tags <perl>say "hello"</perl>. I actually used that idiom in a server side PPI driven highlighter. Using it for a year or so I'm kind of luke warm on that approach.
I really like the idea of Chili after thinking more about it. I believe there are a couple of syntax files for it to do Perl floating around but it would be great if the community could own the definitive version. It would certainly be vetted better just by being used here than it would be as any sort of independent release.
I doubt it'll happen and I won't cry if it doesn't but it would be fun. I volunteer to work on it if it gets some steam and needs an extra hand.
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||