git.iko.soy/typeable/pandoc
on master help sign in
Avoid non-exhaustive pattern match.
e055f1bJohn MacFarlane
src/Text/Pandoc/Readers/Docx/Parse.hs+3−2
@@ -1153,8 +1153,9 @@ getSymChar :: NameSpaces -> Element -> RunElem
1153getSymChar ns element
1153getSymChar ns element
1154 | Just s <- lowerFromPrivate <$> getCodepoint
1154 | Just s <- lowerFromPrivate <$> getCodepoint
1155 , Just font <- getFont =
1155 , Just font <- getFont =
1156− let [(char, _)] = readLitChar ("\\x" ++ s) in
1156+ case readLitChar ("\\x" ++ s) of
1157− TextRun . maybe "" (:[]) $ getUnicode font char
1157+ [(char, _)] -> TextRun . maybe "" (:[]) $ getUnicode font char
1158+ _ -> TextRun ""
1158 where
1159 where
1159 getCodepoint = findAttrByName ns "w" "char" element
1160 getCodepoint = findAttrByName ns "w" "char" element
1160 getFont = stringToFont =<< findAttrByName ns "w" "font" element
1161 getFont = stringToFont =<< findAttrByName ns "w" "font" element