-
Notifications
You must be signed in to change notification settings - Fork 426
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
Incorrect Syntax Highlighting For Escaped Character '\"' #6899
Comments
Hello Sir!! I am new to open source community and want to start by cracking this issue . Please guide me !! |
@LouisJenkinsCS (as creator of the issue) and @lydia-duncan (as tagger with "good first issue"): any suggested pointers? |
Our highlighting stuff is spread across a few places. @LouisJenkinsCS has already pointed out Atom, where a pull request would be useful (I believe the source lives here). I don't remember specifically which of our highlighting solutions Github and Markdown draws from, but the rest of our highlighter implementations are here and here. @ben-albrecht is the other person that might have some insights, I think |
Sorry, didn't receive notification until Lydia pinged me (although I didn't see Brad's either). @lydia-duncan The sublime-text version is just HTML, is that intentional? @victor-ludorum My suggestion is to begin here |
Thanks for listing tmbundle, I missed that one (I think I deleted my bookmark when we pulled it into the chapel-lang heading because I'm silly). I'm not sure about the sublime-text set up - I mostly included it for completeness, it doesn't look like it's been actively developed for a while. |
To verify, 'chapel-tmbundle' is the repository being used to render Chapel, as seen here (Do ctrl + f for 'Chapel'), so 100% it is there. |
My last suggestion would be to find a tool, like this, which would make importing the TextMate bundle (tmbundle) easier to modify and test, as doing it by hand would drive anyone insane. If its as easy as it looks, it might be a 5 minute fix or 5 hours, depending on how familiar you are with context-free grammars. |
@LouisJenkinsCS As you have pointed the code for chapel tmbundle , I have recognised that there is no check for escape character which you have mentioned too . So , in the code
i.e after line 83 we should check for escape character by adding
1 . checking of escaped character code after double character checking i.e after line 83 please suggest whether I am in a right way or not ?? |
First, I'd recommend forking the chapel-tmbundle project, committing the changes you suggested, and then making a Pull Request where I can give a code review. I'm currently away until tonight, but doing the above would allow others to give feedback as well (don't forget to @mention) As well on first glance, your proposed solution looks sound, you just need to try it out next. |
Okay sir thanks! 😄 I will do as you have suggested . |
Summary of Problem
When using escape characters in a string, it compiles fine but the syntax highlighter will treat it as the beginning/end of a string. This occurs in Github's
.chpl
syntax highlighting, Markdown.chpl
syntax highlighting, and in my text-editor Atom language-chapel. I am not sure how it is handled in any others.Steps to Reproduce
Source Code:
TIO (Online Compiler)
The text was updated successfully, but these errors were encountered: