You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the end of line 7 up to the end of line 16 is highlighted as comment. This is not correct.
The / is apparently interpreted as the start or end of the comment. Which is not always correct. / can also mean the "division operator". Only /* and */should be considered the start and end of a comment.
Please tell us about your environment:
Node-RED version: v1.1.3
Node.js version: v12.18.3
npm version: 6.14.6
Platform/OS: Linux 4.18.0-193.6.3.el8_2.x86_64 x64 LE
Browser: chrome
The text was updated successfully, but these errors were encountered:
The syntax highlighting mode had no support for comments at all (as its a relatively new addition to JSONata). What you were seeing was an issue with the regular expression highlighting - any section starting with a / was being identified as a regex - including the comment block at the start.
It needed some additional logic to prevent it mistaking a divide for the start of a regex. Thankfully the existing JavaScript highlight mode showed me the way to disambiguate the two.
I've also added support for /* ... */ comments, and fixed up some highlighting of variables that contain a known function name (eg $sum_cases was getting $sum highlighted as a known function).
What are the steps to reproduce?
What happens?
What do you expect to happen?
From the end of line 7 up to the end of line 16 is highlighted as comment. This is not correct.
The
/
is apparently interpreted as the start or end of the comment. Which is not always correct./
can also mean the "division operator". Only/*
and*/
should be considered the start and end of a comment.Please tell us about your environment:
The text was updated successfully, but these errors were encountered: