Notepad3
Notepad3 copied to clipboard
Syntax highlighting problems with batch files
for /f "delims=" %%a in ('dir "%~1\*.html" /b /a-d /on') do (
for /f "delims== tokens=2*" %%i in ('findstr /i /c:"var sourceRoot" "%~1\%%a"') do (
set sourceRoot=%%i
set sourceRoot=!sourceRoot:~2,-2!
set htmlName=%%a
set htmlName2=!htmlName:~0,-5!
)
>>"%~1.html" (findstr /i "D.p([" "%~1\!htmlName!" | sed.exe -r "1s#(D.p\(\[\x22)[^^*]+\*0#\1!htmlName2!\*0#gi" | sed.exe -r "s#(D.p\(\[\x22)!sourceRoot!#\1!htmlName2!\/#gi")
)
As shown in notepad3, the parentheses in the first for command do not match. But in sublime text 4 there is no problem.