tylerlong / google-code-prettify

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

Capitalized C++ functions mistaken for types #202

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attached html, placed in tests/

What is the expected output?  What do you see instead?
Expected: The function AssignUInt64 is not colored as a type.
Actual: The function AssignUInt64 is colored as a type. 

What version are you using?  On what browser?
svn r220
18.0.1025.151

Please provide any additional information below.
It is possible that the only way to fix this is to not assume capitalized 
tokens are types (except under specific circumstances, such as, 
/class\s+(\w+)/). This appears to be the route github has chosen. 

For example:
https://github.com/joyent/node/blob/master/deps/v8/src/bignum.h.
https://github.com/joyent/node/blob/master/deps/v8/src/bignum.cc.
"class Bignum" is colored but no other references to the class are colored.

I know github is using pygments, not google-code-prettify, but I bring it up as 
a comparison.

Original issue reported on code.google.com by matthew....@gmail.com on 7 Apr 2012 at 11:51

Attachments:

GoogleCodeExporter commented 9 years ago
It's not just titlecased functions, it's all kinds of identifier: int lowercase 
= black; int Titlecase = colored;

Original comment by mr.liste...@gmail.com on 12 Jun 2012 at 8:28