commit e227a8e0a3d021fe6604e09504e8026b6bac3b72
parent 447d0aaeb0f655cac66f73c80a7acdc0e6a6fdff
Author: Antoine A <>
Date: Wed, 7 May 2025 23:50:54 +0200
Improve ts codegen
Diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/codegen_ts.py b/codegen_ts.py
@@ -54,13 +54,13 @@ def fmt_rule(rule):
for r in registry:
ts += f"""{r["code"]}: {{
- 'name': "{r["name"].strip('"')}",
- 'ibanLen': {r["iban_len"]},
- 'bbanLen': {r["bban_len"]},
- 'bbanRules': {fmt_rule(r["bban_rules"])},
- 'bbanRegex': /^{r["bban_regex"]}$/
- }},
- """
+ name: "{r["name"].strip('"')}",
+ ibanLen: {r["iban_len"]},
+ bbanLen: {r["bban_len"]},
+ bbanRules: {fmt_rule(r["bban_rules"])},
+ bbanRegex: /^{r["bban_regex"]}$/
+ }},
+"""
ts += "};"
with open("registry.ts", "w") as ts_file: