Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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.


In reply to Re^3: Syntax highlighting code tags by Your Mother
in thread Syntax highlighting code tags by Tanktalus

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-03-28 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found