git.iko.soy/typeable/pandoc
on master help sign in
Avoid non-exhaustive pattern match.
commite055f1b21e0c9a4486850eac3a2dea12b7d74849 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 10 Aug 2018, 15:05 (8 years ago) parentec89628
1 file changed+3−2
src/Text/Pandoc/Readers/Docx/Parse.hs+3−2
src/Text/Pandoc/Readers/Docx/Parse.hs+3−2
@@ -1153,8 +1153,9 @@ getSymChar :: NameSpaces -> Element -> RunElem
11531153getSymChar ns element
11541154 | Just s <- lowerFromPrivate <$> getCodepoint
11551155 , Just font <- getFont =
1156− let [(char, _)] = readLitChar ("\\x" ++ s) in
1157− TextRun . maybe "" (:[]) $ getUnicode font char
1156+ case readLitChar ("\\x" ++ s) of
1157+ [(char, _)] -> TextRun . maybe "" (:[]) $ getUnicode font char
1158+ _ -> TextRun ""
11581159 where
11591160 getCodepoint = findAttrByName ns "w" "char" element
11601161 getFont = stringToFont =<< findAttrByName ns "w" "font" element