diff options
| author | Michael Williamson <mike@zwobble.org> | 2024-06-13 11:09:57 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2024-06-13 11:09:57 +0100 |
| commit | 700e395a3d2a0c9f6526fe7c69a92bd347fa1b88 (patch) | |
| tree | cf8ca7d2ffb52f4f1c6443a87629cbb880243a23 /lib | |
| parent | b67feb7858174f6ab954784b92b04c6474f29047 (diff) | |
Parse run highlights
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/documents.js | 3 | ||||
| -rw-r--r-- | lib/docx/body-reader.js | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/documents.js b/lib/documents.js index cc6a2a3..c37ec05 100644 --- a/lib/documents.js +++ b/lib/documents.js @@ -63,7 +63,8 @@ function Run(children, properties) { isSmallCaps: !!properties.isSmallCaps, verticalAlignment: properties.verticalAlignment || verticalAlignment.baseline, font: properties.font || null, - fontSize: properties.fontSize || null + fontSize: properties.fontSize || null, + highlight: properties.highlight || null }; } diff --git a/lib/docx/body-reader.js b/lib/docx/body-reader.js index 7a00164..78c732e 100644 --- a/lib/docx/body-reader.js +++ b/lib/docx/body-reader.js @@ -94,7 +94,8 @@ function BodyReader(options) { isItalic: readBooleanElement(element.first("w:i")), isStrikethrough: readBooleanElement(element.first("w:strike")), isAllCaps: readBooleanElement(element.first("w:caps")), - isSmallCaps: readBooleanElement(element.first("w:smallCaps")) + isSmallCaps: readBooleanElement(element.first("w:smallCaps")), + highlight: element.firstOrEmpty("w:highlight").attributes["w:val"] }; }); } |
