From 30674087624a15fd5f51a4f1f47651c6a88b9275 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Tue, 7 May 2024 17:03:25 +0200 Subject: [PATCH] feat(utils): include underlines and small-caps in word parser --- convert_source_description/file_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/convert_source_description/file_utils.py b/convert_source_description/file_utils.py index 06169bc..52f1f7e 100644 --- a/convert_source_description/file_utils.py +++ b/convert_source_description/file_utils.py @@ -34,6 +34,10 @@ def read_html_from_word_file(self, file_path: str) -> str: with open(docx_file_name, "rb") as docx_file: try: + style_map = """ + u => u + small-caps => span.small-caps + """ result = mammoth.convert_to_html( docx_file, style_map=style_map)