doddoreul / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

Perl Syntax Hilighting Issue #57

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
View this file:
http://code.google.com/p/morrison-code/source/browse/trunk/Perl/Object.pm

notice after this line 

$methodName =~ s/.*:://;

everything is green.

the /// operator in Perl source code apparently causes a problem with the
syntax highlighting.

Original issue reported on code.google.com by mattj.mo...@gmail.com on 30 Nov 2008 at 10:09

GoogleCodeExporter commented 8 years ago
Yep.  Javascript syntax for regex literals doesn't conflict too much with C and 
java
but trying to recognize perl regexs in code that might not be perl causes bad 
things
to happen.

Do you know of a simple grammar that handles a good chunk of perl so that I can 
roll
a perl mode?

Original comment by mikesamuel@gmail.com on 15 May 2009 at 6:21

GoogleCodeExporter commented 8 years ago
I think the //, m//, tr/// and s/// operators are probably the ones that will 
cause
the most problems.  Here is an example of some JavaScript that someone wrote to
highlight perl syntax: http://www.perlmonks.org/?node_id=336126

Original comment by mattj.mo...@gmail.com on 30 May 2009 at 3:15

GoogleCodeExporter commented 8 years ago
Issue 83 has been merged into this issue.

Original comment by mikesamuel@gmail.com on 14 Aug 2009 at 5:52

GoogleCodeExporter commented 8 years ago
This also applies to the other quote operators 
http://perldoc.perl.org/perlop.html#Quote-Like-Operators

Original comment by B2Gi...@gmail.com on 29 Sep 2009 at 6:37

GoogleCodeExporter commented 8 years ago
This has also been a problem for me, with quote-like operators.

Perl syntax is non-trivial to parse. The best independent Perl 
syntax-highlighter I know is Padre (http://padre.perlide.org/). You might get 
some tips from them.

Original comment by allisonr...@gmail.com on 2 May 2013 at 5:15