aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Docx
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-08-10 15:05:25 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-08-10 15:05:25 -0700
commite055f1b21e0c9a4486850eac3a2dea12b7d74849 (patch)
tree72e8bdb825764ca014f219c1c9a60f87ecc8bf97 /src/Text/Pandoc/Readers/Docx
parentec896289841297e5d7cdcc433b8db3fa90508d6d (diff)
downloadpandoc-e055f1b21e0c9a4486850eac3a2dea12b7d74849.tar.gz
Avoid non-exhaustive pattern match.
Diffstat (limited to 'src/Text/Pandoc/Readers/Docx')
-rw-r--r--src/Text/Pandoc/Readers/Docx/Parse.hs5
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