From 90cb8fc665b43568f5fe6acf570a388e89ab9424 Mon Sep 17 00:00:00 2001 From: Kibzik Date: Thu, 16 Mar 2023 16:59:16 +0300 Subject: [PATCH] Little changes --- preset/epub_presets.json | 2 +- src/livecarta_config.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/preset/epub_presets.json b/preset/epub_presets.json index b4a5ce5..9e08124 100644 --- a/preset/epub_presets.json +++ b/preset/epub_presets.json @@ -21,7 +21,7 @@ "preset_name": "replacer", "rules": [ { - "tags": ["^h[6-9]$", "^figure$", "^section$", "blockquote"], + "tags": ["^h[6-9]$", "^figure$", "^section$", "^blockquote$"], "condition": null, "tag_to_replace": { "name": "p" diff --git a/src/livecarta_config.py b/src/livecarta_config.py index f13f597..e9a896f 100644 --- a/src/livecarta_config.py +++ b/src/livecarta_config.py @@ -30,10 +30,9 @@ class LiveCartaConfig: # Dictionary mapping HTML tags to CSS style attributes that can be contained within them TAGS_TO_STYLE_ATTRS_CAN_BE_IN_TAG = { "^p$": ["text-align", "text-indent", "border-bottom", "border-top", "border-left", "border-right", - "background-color"], + "background-color", "background"], r"(^h[1-9]$)": ["list-style-type", "border-bottom", "border-top", "border-left", "border-right", - "background-color"], - "^div$": ["border-bottom", "border-top", "border-left", "border-right", "background-color"], + "background-color", "background"], "^li$": ["text-align", "list-style-type"], "^ul$": ["list-style-type"], "^ol$": ["list-style-type"]