quick fix

This commit is contained in:
shirshasa
2020-08-28 13:52:06 +03:00
parent b66ef6296f
commit e4f4a8a089

View File

@@ -92,10 +92,10 @@ class HTMLPreprocessor:
font.attrs["style"] = style font.attrs["style"] = style
if face is not None: if face is not None:
face = re.sub(r",[\w,\- ]*$", "", face) face = re.sub(r",[\w,\- ]*$", "", face)
if face != BookConfig.DEFAULT_FONT_NAME and BookConfig.font_correspondence_table.get(face): if face != LawCartaConfig.DEFAULT_FONT_NAME and LawCartaConfig.font_correspondence_table.get(face):
font.attrs["face"] = BookConfig.font_correspondence_table[face] font.attrs["face"] = LawCartaConfig.font_correspondence_table[face]
else: else:
font.attrs["face"] = BookConfig.DEFAULT_FONT_NAME font.attrs["face"] = LawCartaConfig.DEFAULT_FONT_NAME
if len(font.attrs) == 0: if len(font.attrs) == 0:
font.unwrap() font.unwrap()