diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-08-10 15:05:25 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-08-10 15:05:25 -0700 |
commit | e055f1b21e0c9a4486850eac3a2dea12b7d74849 (patch) | |
tree | 72e8bdb825764ca014f219c1c9a60f87ecc8bf97 /src/Text/Pandoc/Readers | |
parent | ec896289841297e5d7cdcc433b8db3fa90508d6d (diff) | |
download | pandoc-e055f1b21e0c9a4486850eac3a2dea12b7d74849.tar.gz |
Avoid non-exhaustive pattern match.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Docx/Parse.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Docx/Parse.hs b/src/Text/Pandoc/Readers/Docx/Parse.hs index 99f50ba97..cbf865de8 100644 --- a/src/Text/Pandoc/Readers/Docx/Parse.hs +++ b/src/Text/Pandoc/Readers/Docx/Parse.hs @@ -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 |