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

FLOW_CONTROL_KEYWORDS should not contain do #366

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

FLOW_CONTROL_KEYWORDS should not contain do #366

GoogleCodeExporter opened this issue Feb 20, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
Visit http://stackoverflow.com/q/28197948/1426065 and look at the code section 
at the bottom of the original question. After the imports, 2 variables are 
assigned:

do = dir_with_original_files = ...
dm = dir_with_modified_files = ...

`do` is highlighted as a keyword, while `dm` is the standard black color. 
Python does not include a `do` keyword, so it should not be highlighted.

What version are you using?  On what browser?

I'm not a Stack Exchange dev, so I don't know what version they're using, but 
looking at the current source online, the issue is still there. I'm using 
Firefox, but I assume this would show up in any browser.

Please provide any additional information below.

In prettify.js line 95 
(https://code.google.com/p/google-code-prettify/source/browse/trunk/src/prettify
.js#95), FLOW_CONTROL_KEYWORDS is defined as 
["break,continue,do,else,for,if,return,while"]. One line 125, PYTHON_KEYWORDS 
is defined as FLOW_CONTROL_KEYWORDS plus a number of others. Many of the other 
languages listed are defined in a similar manner. Since not all languages 
(including Python) have `do` as a keyword, it should be removed from 
FLOW_CONTROL_KEYWORDS and added individually to those languages that define it.

Original issue reported on code.google.com by [email protected] on 28 Jan 2015 at 7:36

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