aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-02-13 19:03:49 +0000
committerMichael Williamson <mike@zwobble.org>2016-02-13 19:03:49 +0000
commit3b306d59bb9abcbb061735d4ae0cc40522c2ce0c (patch)
tree68f252c0a7af83dda06c2e2a0c0ef4373f2bc8d4 /src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java
parent076f72fe3bdc8cdbad4ca538a0a91b3844baef11 (diff)
Read bold runs
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) {