Avoid non-exhaustive pattern match.
This commit is contained in:
parent
ec89628984
commit
e055f1b21e
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue