Closed zeande closed 9 months ago
Thanks for this pullrequest. would you see it possible to foresee a unit test?
Thanks for this pullrequest. would you see it possible to foresee a unit test?
Sorry, was a bit apprehensive, since I'm not familiar with the language. The latest commit contains some unit tests for the change.
@waldo1001 - unit tests added. If you are OK with the proposed changes, this PR would be ready to merge.
Local test result output:
Thanks so much! 🙏
Please revert this change, this causes some other side effects. I ask my colleagues for details. More infos will be coming soon.
Here it is:
Here it is:
In AL Code, it is required that any field name starting with an integer is wrapped in double quotes. If not, then the compiler throws a huge fit.
When saving a file, the CRS language extension currently removes quotes from these field names, resulting in uncompilable code. Even if using ">Save without formatting", the CRS extension still removes the quotes. This problem is described in #153
This fix changes the
StringFunctions.encloseInQuotesIfNecessary
method to also recognize such field names and enclose them in quotation marks.