-
Notifications
You must be signed in to change notification settings - Fork 168
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
Fixing issue #746 #751
Fixing issue #746 #751
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a fix I'm willing to take, but it shouldn't duplicate the effort of #744. Take out those changes and just leave views.py
changes and I'll merge this in!
@geekygirlsarah Sure thing, I will just do necessary change which is in view.py asap, thank you ! |
Hey @geekygirlsarah , I'm currently checking for the 'clips' language only. Would you like to make Prolog the default for syntax highlighting? Advantages: Disadvantages: |
91a3541
to
de12b6e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting change, I was thinking of moving the lexers to the meta file for languages to keep language stuff together, but I guess it could work in settings too. I can merge it in if you tidy up the try/except blank line!
So, i created a new function named 'get_highlighter' which returns lexer and added SIMILAR_LEXERS in setings.py so now if this case happens again we just have to add into dictionary |
I chose to put it in settings because the settings are loaded into memory when the app starts, which is comparatively faster than anything else ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll merge it in! Thanks for helping out!
Don't forget it's Hacktoberfest this month. Be sure to register if you haven't as this project counts towards it!
What GitHub issue does this PR apply to?
Resolves #746
What changed and why?
There was an issue with Pygments because it does not support 'clips' highlighting. After some research, I found that 'prolog' has a similar syntax highlighting style. Therefore, I modified the get_lexer_by_name function to check for 'clips' and changed it with 'prolog'. I tested the changes, and the issue has been resolved, with syntax highlighting working as expected.
(If editing website code) Please add screenshots
Checklist
Any additional comments or things to be aware of while reviewing?