Skip to content

Commit

Permalink
Recognize functions with leading ampersand
Browse files Browse the repository at this point in the history
  • Loading branch information
rwstauner committed Oct 28, 2011
1 parent 5dbd5be commit ad55b49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/shBrushPerl.js
Expand Up @@ -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' },
Expand Down
2 changes: 1 addition & 1 deletion tests/brushes/perl.html
Expand Up @@ -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

Expand Down

0 comments on commit ad55b49

Please sign in to comment.