aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Docx/Parse/Styles.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Docx/Parse/Styles.hs b/src/Text/Pandoc/Readers/Docx/Parse/Styles.hs
index 050bfecbc..a23f99c55 100644
--- a/src/Text/Pandoc/Readers/Docx/Parse/Styles.hs
+++ b/src/Text/Pandoc/Readers/Docx/Parse/Styles.hs
@@ -239,8 +239,8 @@ buildBasedOnList ns element rootStyle =
stringToInteger :: Text -> Maybe Integer
stringToInteger s = case Data.Text.Read.decimal s of
- Right (x,_) -> Just x
- Left _ -> Nothing
+ Right (x,t) | T.null t -> Just x
+ _ -> Nothing
checkOnOff :: NameSpaces -> Element -> QName -> Maybe Bool
checkOnOff ns rPr tag