fix: align contextual CSS rendering and Word styles

This commit is contained in:
2026-10-30 13:12:05 +08:00
parent cc4f91899e
commit f9bf62b71c
17 changed files with 313 additions and 53 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ def normalize_rule(value: object) -> dict[str, Any]:
if key in rule and not isinstance(rule[key], bool):
rule.pop(key)
for key in ('font_color', 'background_color', 'border_color'):
if key in rule and not re.fullmatch(r"auto|transparent|#[0-9a-fA-F]{6}", str(rule[key])):
if key in rule and not re.fullmatch(r"auto|transparent|inherit|#[0-9a-fA-F]{6}", str(rule[key])):
rule.pop(key)
for key, allowed in {"alignment": {"left", "center", "right", "justify"},
"indent_mode": {"none", "first", "hanging"},