scripts: generate-builtin-terminfo: fix syntax error

This commit is contained in:
Artturin 2024-05-01 21:18:41 +03:00
parent 3c4669061b
commit 3a7ea1f44b

View file

@ -57,7 +57,7 @@ class StringCapability(Capability):
ctrl = m.group(1)
if ctrl == '?':
return '\\x7f'
return f'\\x{ord(ctrl) - ord('@'):02x}'
return f'\\x{ord(ctrl) - ord("@"):02x}'
value = re.sub(r'\^([@A-Z[\\\\\]^_?])', translate_ctrl_chr, value)
# Ensure e.g. \E7 (or \e7) doesnt get translated to “\0337”,