githubramakrishnan / google-code-prettify

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

Hash mark (#) treated as comment start in Perl even when it isn't #162

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Consider a Perl statement like this:

    $last_index = $#array;

The hash mark here is treated like the start of an in-line comment; the text 
"#array;" appears in comment style. In fact, this is normal Perl syntax for the 
last valid index of an array.

I'm using whatever version is currently installed at StackOverflow.

Original issue reported on code.google.com by Ted.H...@gmail.com on 30 Jun 2011 at 9:15

GoogleCodeExporter commented 9 years ago
Same here with css id selector, like:
@codeStart #id { attribute: value; } @codeEnd
The whole line ^ treated as comment.

Live example: http://jsfiddle.net/bN3gr/

Original comment by roman.a....@gmail.com on 1 Aug 2011 at 8:45

GoogleCodeExporter commented 9 years ago
Also  caused by using hashes as delimiter in quote like operators

       qq#test#;

And also by regex operators

      s#a#b#;

both of these are normal alternative delimiters

Original comment by work.ty...@gmail.com on 4 May 2013 at 12:52