Permalink
Browse files

Recognize functions with leading ampersand

  • Loading branch information...
1 parent 5dbd5be commit ad55b496bc57e1815c6a703a441fb0a6fa1226d9 @rwstauner rwstauner committed Oct 28, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 scripts/shBrushPerl.js
  2. +1 −1 tests/brushes/perl.html
@@ -57,7 +57,7 @@
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
// currently ignoring single quote package separator and utf8 names
- { regex: /(?:[$@%*]|\$#)[a-zA-Z_](\w+|::)*/g, css: 'variable' },
+ { regex: /(?:&|[&$@%*]|\$#)[a-zA-Z_](\w+|::)*/g, css: 'variable' },
{ regex: /\b__(?:END|DATA)__\b[\s\S]*$/g, css: 'comments' },
{ regex: /^=\w[\s\S]*?\n=cut\s*$/gm, css: 'comments' }, // pod
{ regex: new RegExp(this.getKeywords(funcs), 'gm'), css: 'functions' },
@@ -11,7 +11,7 @@
print $#array, $array[0];
local $ENV{FOO} = qq[BAR $foo];
-call(func => "args", opt => q#val#);
+call(func => "args", opt => q#val#, code => \&baz);
=pod

0 comments on commit ad55b49

Please sign in to comment.