-
Notifications
You must be signed in to change notification settings - Fork 35
Escape Character "\" causing format issues when escaping "~" #256
Comments
Hello @johnnyhaff, I'm not sure that I understand what you are trying to achieve? Is the backslash If i put this statement in a new file:
I can reproduce the behavior you describe. But this is because the code does not compile. The Does this code compile on your end? |
I will add that if you want to match a literal |
Hi @jcaillon, |
Oh... So the code compiles on linux but not on windows; a shame for a cross-platform language :/ My toughts:
Before using 3P, did you edit your code directly on the linux machine? As a best practice, I would say it is much better to use the cross-platform escape char I don't know if I should handle this special case, giving the fact that 3P is a windows tool. What do you think? |
It does compile on Linux, however we generally don't compile code that runs on Linux, only Windows code gets compiled. And, for that reason is probably why this has never been picked up by the compiler for so long. Once moving to 3P I started noticing the formatting issues. This is legacy code so it might be difficult to update, but using "~~" to escape the tilde does work in Linux. |
Thank you for your understanding. I will keep that in mind if I rewrite the parser. But yes, for now, it does not seem to be a priority feature. Best regards |
Description of the Issue
When using
\
to escape a~
, the formatting of everything after that turns yellow and the plugin doesn't recognize any procedures, functions, etc after it.Steps to Reproduce the Issue
In my instance am doing a database query which the field might contain the literal value of
~
as a delimiter, My query would look similar to this:FIND FIRST someTable WHERE NUM-ENTRIES(someField, "\~") >= 2 NO-ERROR. IF AVAILABLE someTable THEN DO: [some code....] END.
Notice that everything after
NUM-ENTRIES(someField, "\~")
is turned to yellow. If you have other define procedures further down in your code, they no longer show up in your Code Explorer.Expected Behavior
I would expect that the
\
would be considered a valid escape character as mentioned here in KB000020457. This code is being run on a Unix platform.Actual Behavior
Screenshots
Debug Information
3P Version: v1.8.4 x64
NPP Version: v7.5.9 x64
The text was updated successfully, but these errors were encountered: