From 0d5b27652c119dfaf99fae5f4e624c9efec408b5 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 13 Jun 2024 11:13:28 +0100 Subject: Parse run highlights --- mammoth/docx/body_xml.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mammoth/docx') diff --git a/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py index 005ad3d..83cbd90 100644 --- a/mammoth/docx/body_xml.py +++ b/mammoth/docx/body_xml.py @@ -102,6 +102,7 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f is_strikethrough = read_boolean_element(properties.find_child("w:strike")) is_all_caps = read_boolean_element(properties.find_child("w:caps")) is_small_caps = read_boolean_element(properties.find_child("w:smallCaps")) + highlight = properties.find_child_or_null("w:highlight").attributes.get("w:val") def add_complex_field_hyperlink(children): hyperlink_kwargs = current_hyperlink_kwargs() @@ -126,6 +127,7 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f vertical_alignment=vertical_alignment, font=font, font_size=font_size, + highlight=highlight, )) def _read_run_style(properties): -- cgit v1.2.3