forked from LiveCarta/BookConverter
Move align to style attr.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import re
|
||||
import cssutils
|
||||
from bs4 import BeautifulSoup
|
||||
from typing import Tuple, Dict
|
||||
from typing import Tuple
|
||||
from os.path import dirname, normpath, join
|
||||
|
||||
from src.util.color_reader import str2hex
|
||||
@@ -167,6 +166,8 @@ class StylePreprocessor:
|
||||
|
||||
for tag_initial_inline_style in tags_with_inline_style:
|
||||
inline_style = tag_initial_inline_style.attrs["style"]
|
||||
if tag_initial_inline_style.attrs.get("align"):
|
||||
inline_style += f";text-align: {tag_initial_inline_style.attrs['align']};"
|
||||
tag_initial_inline_style.attrs["style"] = \
|
||||
self.build_inline_style_content(inline_style)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user