Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
more useful options
 
PerlMonks  

Re: (Client side) Perl Syntax Highlighter

by tachyon (Chancellor)
on Mar 12, 2004 at 14:08 UTC ( [id://336239]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to (Client side) Perl Syntax Highlighter

Fascinating! These patches fix the moving my issue (actually any key word that follows a comment will right shift onClick refresh) and convert tabs to 4 spaces for consistency.

45c45 < s = s.replace(/\&/g, "&amp;").replace(/</g, "&lt;").replace( +/>/g, "&gt;").replace(/\n/g, "<BR>"); --- > s = s.replace(/\&/g, "&amp;").replace(/</g, "&lt;").replace( +/>/g, "&gt;").replace(/\n/g, "<BR>").replace(/\t/g, ' '); 80c80 < re = /\#.*?(\r|\n)/; --- > re = /\#.*?[\r|\n]+/;

cheers

tachyon

Replies are listed 'Best First'.
Re: Re: (Client side) Perl Syntax Highlighter
by Jaap (Curate) on Mar 12, 2004 at 16:29 UTC
    Thank you. Did you mean for the '|' to be between the \r and \n?

      Nope! I meant [\n\r]+ Great work, very impressive use of JS. As the author you have to patch the patches :-)

      cheers

      tachyon

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://336239]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.