Alien-CodePress

 view release on metacpan or  search on metacpan

cp/codepress/languages/perl.js  view on Meta::CPAN

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
* CodePress regular expressions for Perl syntax highlighting
 * By J. Nick Koston
 */
 
// Perl
Language.syntax = [
        { input  : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
        { input  : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
        { input  : /([\$\@\%][\w\.]*)/g, output : '<a>$1</a>' }, // vars
        { input  : /(sub\s+)([\w\.]*)/g, output : '$1<em>$2</em>' }, // functions
        { input  : /\b(abs|accept|alarm|atan2|bind|binmode|bless|caller|chdir|chmod|chomp|chop|chown|chr|chroot|close|closedir|connect|continue|cos|crypt|dbmclose|dbmopen|defined|delete|die|do|dump|each|else|elsif|endgrent|endhostent|endnetent|endprotoent|e...
        { input  : /([\(\){}])/g, output : '<u>$1</u>' }, // special chars
        { input  : /#(.*?)(<br>|<\/P>)/g, output : '<i>#$1</i>$2' } // comments
]
 
Language.snippets = []
 
Language.complete = [
        { input : '\'',output : '\'$0\'' },
        { input : '"', output : '"$0"' },
        { input : '(', output : '\($0\)' },



( run in 0.235 second using v1.01-cache-2.11-cpan-eab888a1d7d )