auto-prepend # to colors

This commit is contained in:
Jan Petykiewicz 2026-11-23 12:18:29 -08:00
commit 51243f3bbc

2
k2t.py
View file

@ -179,6 +179,8 @@ class Entry:
if not isinstance(val, str): if not isinstance(val, str):
val = str(val).lower() val = str(val).lower()
if val != 'none': if val != 'none':
if tag.endswith('-color') and not val.startswith('#'):
val = '#' + val
el2.text = val el2.text = val
elif tag == 'source': elif tag == 'source':
el2.text = '*/*@*' el2.text = '*/*@*'