Docx reader: fix stringToInteger.

It previously converted things like `11ccc` to an integer;
now it requires that the whole string be parsable as an integer.

Closes #9184.
This commit is contained in:
John MacFarlane
2025-07-27 10:40:06 -07:00
parent caa2193912
commit 8735bc03d8
+2 -2
View File
@@ -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