-
-
Notifications
You must be signed in to change notification settings - Fork 447
Syntax Highlighting: JavaScript (Regular expression literal) #1185
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
Comments
Thank you for the feedback. |
Thank you for the report and sorry for the enbug. |
Regrettably, I need to say I reopen this issue because the JavaScript syntax highlight definition will be restored in the next version to solve the further issue, which was reported by @JJHackimoto and in #1187. I understand the current issue on the regex literal in CotEditor's JavaScript definition. However, by studying the source code, I realize this is the limit of the current syntax highlight mechanism in CotEditor, which is simple but originally designed aiming that users can modify it easily in GUI. To solve this issue, I need to redesign CotEditor's syntax highlight system and definition format drastically. In other words, it takes time. Sorry for that. I actually know for years I need to update this highlighting system and put in my to-do list, but not decided yet when I'll set about this task. |
Uh oh!
There was an error while loading. Please reload this page.
Regular expression literal are not properly rendered. If quotes
"
are included in a regex literal, all syntax highlights after that will fail.Creating a regular expression
You construct a regular expression in one of two ways:
Regular expression literals provide compilation of the regular expression when the script is loaded. If the regular expression remains constant, using this can improve performance.
RegExp
object, as follows:Using the constructor function provides runtime compilation of the regular expression. Use the constructor function when you know the regular expression pattern will be changing, or you don't know the pattern and are getting it from another source, such as user input.
Referenced from: Regular expressions - JavaScript | MDN
The text was updated successfully, but these errors were encountered: