Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perl syntax highlighting does not recognize POD and highlights quotes in comments #354

Open
GoogleCodeExporter opened this issue Feb 20, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Perl syntax highlighting in google-code-prettify has 2 problems:

1) POD (Plain Old Documentation) and __END__ are not recognized at all. POD is 
everything between =something and =end; everything after __END__ is also not 
parsed, so should be treated as a comment.

Example of incorrect highlighting using current prettify:

http://vmx.yourcmc.ru/var/tmp/Field.htm

Just trying to add a rule for POD doesn't work because of 
shortcutStylePatterns.push([PR_PLAIN, /^\s+/, null, ' \r\n\t\xA0']);

So I've commented this line in the patch. I think it's anyway useless.

3) And after fixing POD, there is still a problem with quotes in comments - 
prettify treats a quote inside comment as a beginning of string! Example:

http://vmx.yourcmc.ru/var/tmp/Field_pod.htm

(see incorrect highlighting in SQL_DEFINITIONS)

This is fixed by adding # as a character in the definition of punctuation...

Example with both problems fixed:

http://vmx.yourcmc.ru/var/tmp/Field_fixed.htm

Patch is attached.

Original issue reported on code.google.com by [email protected] on 28 Oct 2014 at 2:01

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant