aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java')
-rw-r--r--src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java b/src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java
index e9fca9c..2982916 100644
--- a/src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java
+++ b/src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java
@@ -49,7 +49,14 @@ public class BodyXmlReader {
return ReadResult.map(
readRunStyle(properties),
readElements(element.children()),
- (style, children) -> new Run(false, style, children));
+ (style, children) -> new Run(
+ isBold(properties),
+ style,
+ children));
+ }
+
+ private boolean isBold(XmlElementLike properties) {
+ return properties.hasChild("w:b");
}
private Result<Optional<Style>> readRunStyle(XmlElementLike properties) {