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
Batch syntax highlighting doesn't work properly with expansion modifiers #4
Comments
It would help to include a link to documentation of the expansion modifier syntax. |
I see different editors do it differently:
Regardless, It may be useful: Running
|
The code that implements this is around line 404 of LexBatch.cxx. Changing it is complicated by the need to update several variables to retreat back past additional characters to the digit. |
Expanded arguments have a single digit at the end. Fixes GitHub issue ScintillaOrg#4.
Pull request committed with minor changes. Credited to "riQQ". If you want a different name in the credits then tell me. |
That's fine, thanks. |
Came here for 1 more special case: for /F "tokens=1,3,4 delims=:" %%a in ("!inioff!") do (
set "inioff=%%~a"
set "base=%%~b"
set /A "size=%%~c" )
Lines 400 to 450 in e9bf225
Initial discussion at zufuliu/notepad2#332 (comment) as the item 1. |
Committed b39c460 patch with some changes to x.bat.styled and x.bat.folded. The patch was a little strange as it appeared to be making new x.bat.styled.new and x.bat.folded.new files but with just the new text as if they were based on a shortened version of x.bat with just the new examples. Its perfectly OK to provide a new example file (and its processed forms) just for a bug. For example, test/examples/markdown/Bug2235.md. When adding to an existing example, run the tester, check the resulting .new files then rename them without the .new (replacing the old .styled/.folded) then include these modifications in the patch. |
OK, got it. I misunderstood the test part, thought the owner will do the final step 😅, as drawn by the popup Lines 6 to 10 in e9bf225
Thanks for your effort! As we use git/hg, changes can be easily traced, may just patching the .styled/.folded files be OK? |
There's more explanation further on in CONTRIBUTING. Sending patches containing just the additions is good. |
Example:
echo %~dp09
Only
%~dp0
should be highlighted as a batch identifier instead of%~dp09
.Notepad++ Screenshot (the screenshot was made with an older version, but it's still reproducable with Notepad++ 7.9.5)
This was already reported at notepad-plus-plus/notepad-plus-plus#63.
The text was updated successfully, but these errors were encountered: