Avoid non-exhaustive pattern match.

This commit is contained in:
John MacFarlane 2018-08-10 15:05:25 -07:00
parent ec89628984
commit e055f1b21e

View file

@ -1153,8 +1153,9 @@ getSymChar :: NameSpaces -> Element -> RunElem
getSymChar ns element
| Just s <- lowerFromPrivate <$> getCodepoint
, Just font <- getFont =
let [(char, _)] = readLitChar ("\\x" ++ s) in
TextRun . maybe "" (:[]) $ getUnicode font char
case readLitChar ("\\x" ++ s) of
[(char, _)] -> TextRun . maybe "" (:[]) $ getUnicode font char
_ -> TextRun ""
where
getCodepoint = findAttrByName ns "w" "char" element
getFont = stringToFont =<< findAttrByName ns "w" "font" element