Accept cbr,cnl,cnewline without params

This commit is contained in:
kwaroran
2025-04-23 12:41:48 +09:00
parent 59fdcc20b3
commit 89257b2ed4

View File

@@ -1239,6 +1239,11 @@ function basicMatcher (p1:string,matcherArg:matcherArg,vars:{[key:string]:string
case 'screen_height':{ case 'screen_height':{
return get(SizeStore).h.toString() return get(SizeStore).h.toString()
} }
case 'cbr':
case 'cnl':
case 'cnewline':{
return '\\n'
}
} }
const arra = p1.split("::") const arra = p1.split("::")
if(arra.length > 1){ if(arra.length > 1){
@@ -1688,7 +1693,7 @@ function basicMatcher (p1:string,matcherArg:matcherArg,vars:{[key:string]:string
case 'cbr': case 'cbr':
case 'cnl': case 'cnl':
case 'cnewline':{ case 'cnewline':{
return '\\n' return '\\n'.repeat(Number(arra[1]))
} }
} }
} }