Skip to content

Commit

Permalink
feat(utils): include underlines and small-caps in word parser
Browse files Browse the repository at this point in the history
  • Loading branch information
musicEnfanthen committed May 7, 2024
1 parent 1d2dcdc commit 3067408
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions convert_source_description/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 3067408

Please sign in to comment.