diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-08-10 22:31:49 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-08-10 22:31:49 -0700 |
commit | b3c9d94fe036d1c42b1118a43d55a89a2244eaeb (patch) | |
tree | f13d2928d5d6dc71a4873a856f98d7e1baf3275a /src | |
parent | 1e0439710b0bbc54e9e4fa4f9f88ecc4e15b7c5a (diff) | |
download | pandoc-b3c9d94fe036d1c42b1118a43d55a89a2244eaeb.tar.gz |
Avoid non-exhaustive pattern match.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/Txt2Tags.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Txt2Tags.hs b/src/Text/Pandoc/Readers/Txt2Tags.hs index 525e675bf..26dc934a9 100644 --- a/src/Text/Pandoc/Readers/Txt2Tags.hs +++ b/src/Text/Pandoc/Readers/Txt2Tags.hs @@ -575,8 +575,10 @@ symbol = B.str . (:[]) <$> oneOf specialChars getTarget :: T2T String getTarget = do mv <- lookupMeta "target" . stateMeta <$> getState - let MetaString target = fromMaybe (MetaString "html") mv - return target + return $ case mv of + Just (MetaString target) -> target + Just (MetaInlines [Str target]) -> target + _ -> "html" atStart :: T2T () atStart = (sourceColumn <$> getPosition) >>= guard . (== 1) |