-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Optimized closing characters. #41
Conversation
If you type |
Can we add another option for the escape character then? All the large code editors allow for escape characters to be used inside of strings like this. For more efficiency, you can also change the |
Also, CodeJar tends to be used with more common languages like HTML, JS, Python, C, than with Bash or Joylang. In this sense, these are the corner cases that can be ignored as most common languages use the backslash to escape characters. |
Can you upload your solution to https://codesandbox.io/? I'd like to test it. |
Yeah, here it is: https://k78pn.csb.app/ |
Yes, works really good. Just wondering is it make sense to also escape brackes?
Maybe apply this only to |
Yeah, that seems more ergonomic, it does add one extra condition but that shouldn't harm processing time too much, especially in more modern browsers. I added that condition to the fork by adding an escapeCharacter condition. |
When typing a closing character for example the double quote (
"
), any closing characters inside this are also closed. This is good unless the characters are escaped by a backslash (\
). When typing"\"
you will get a doubly closed quote, such that the editor displays"\"""
. This is an invalid string in most editors. Instead, the editor should display"\""
which is a valid string. This request fixes this by testing for a backslash in the character before the cursor.