issue if method eq keyword #21
Closed
Comments
Thanks for reporting this. Now what we need is for some Perl guru to figure out how best to fix it… Probably will take some time. |
I'm not very good with JS, so Highlight.js source code is too sophisticated for me to fix it by myself, but it must be the rule kind of "Perl keyword cannot be prepended with ->". Also I found another problem: in Perl the construction $#myarray means "index of the last element in the array @myarray", but Highlight.js treat it as a comment (and not only the array, but it marks as a comment everything that follows # here). foreach my $num (0..$#array) {
# comment is here, not above
} This issue is more important than previous because it's really frequent language construction. |
Fixed both issues in master branch. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Method that matches language keyword is highlighted as keyword as well (as I see for Perl).
Thus, e.g. there is built-in function (keyword) "sort" and if one prints "object->sort", so in this case "sort" as method of the class will be treated by highlight.js as keyword. Screen shot is here:
http://www.flickr.com/photos/yaskevich/5870302481/
The text was updated successfully, but these errors were encountered: