Initial commit

This commit is contained in:
exteraGramPlugins committed 2026-10-09 12:25:06 +00:00
commit 787965ebbf
37 files changed
+2613

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
from textutil import normalize
class TemplateError(ValueError):
pass
def render(template: str, name: str) -> str:
normalized = normalize(name)
try:
return template.format(name=normalized)
except (KeyError, IndexError, ValueError):
raise TemplateError(f"unsupported placeholder in {template!r}")