Notepad3 icon indicating copy to clipboard operation
Notepad3 copied to clipboard

Syntax highlighting problems with batch files

Open kidzgy opened this issue 2 years ago • 0 comments

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")
)

微信截图_20230817152528 微信截图_20230817094122

As shown in notepad3, the parentheses in the first for command do not match. But in sublime text 4 there is no problem.

kidzgy avatar Aug 17 '23 07:08 kidzgy