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

Apex Syntax Highlighting Not Working #1526

Closed
samdavyson opened this issue Sep 15, 2014 · 4 comments
Closed

Apex Syntax Highlighting Not Working #1526

samdavyson opened this issue Sep 15, 2014 · 4 comments

Comments

@samdavyson
Copy link

The syntax highlighting for the apex code (used in Salesforce.com) in the samples folder is not working:

https://github.com/github/linguist/tree/4a017d9033f91b2776eb85275463f9613cc371ef/samples/Apex

Neither is the apex code in my private repos. The highlighting should be the same as that for Java but the file extension is .cls.

@pchaigno
Copy link
Contributor

Linguist only detects the languages. The highlighting is done by Pygments. It doesn't have a lexer for Apex currently and this is why it doesn't get highlighted on GitHub. You can report the issue on Pygments' BitBucket repository (or even better, open a pull request).

In the meantime, do you think that we could use the Java lexer? I tried it on one of our Apex files but there seem to be some errors with the single quotes...

@samdavyson
Copy link
Author

Yes I think the Java lexer would be better than nothing for the moment. I have reported the issue on Pygments too. Thank you for your prompt response.

@pchaigno
Copy link
Contributor

I opened #1536 to set Java as the lexer for Apex.

Someone responded to you on Pygments' repository. Knowledge of Apex is required to make the lexer so you will probably be the best person for the job. I'm sure contributors to Pygments would be willing to help you.

@arfon
Copy link
Contributor

arfon commented Sep 16, 2014

@samdavyson - #1536 has just been merged and so this should improve soon (likely the next week or two) when we update the site with the new version of Linguist.

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

No branches or pull requests

3 participants