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 getSymChar ns element
| Just s <- lowerFromPrivate <$> getCodepoint | Just s <- lowerFromPrivate <$> getCodepoint
, Just font <- getFont = , Just font <- getFont =
let [(char, _)] = readLitChar ("\\x" ++ s) in case readLitChar ("\\x" ++ s) of
TextRun . maybe "" (:[]) $ getUnicode font char [(char, _)] -> TextRun . maybe "" (:[]) $ getUnicode font char
_ -> TextRun ""
where where
getCodepoint = findAttrByName ns "w" "char" element getCodepoint = findAttrByName ns "w" "char" element
getFont = stringToFont =<< findAttrByName ns "w" "font" element getFont = stringToFont =<< findAttrByName ns "w" "font" element