aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/RST.hs
diff options
context:
space:
mode:
authorMauro Bieg <mb21@users.noreply.github.com>2018-10-04 18:45:59 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-04 09:45:59 -0700
commit600034d7ff83b7ece292016a1e9c232fd7ac66f7 (patch)
treeb6bc7300dd12a61ae32f664a2e38167c2552b2a0 /src/Text/Pandoc/Writers/RST.hs
parent1a6e6a3a032b70eddc945eafd67599cc071b0f6a (diff)
downloadpandoc-600034d7ff83b7ece292016a1e9c232fd7ac66f7.tar.gz
Add lookupMeta* functions to Text.Pandoc.Writers.Shared (#4907)
Remove exported functions `metaValueToInlines`, `metaValueToString`. Add new exported functions `lookupMetaBool`, `lookupMetaBlocks`, `lookupMetaInlines`, `lookupMetaString`. Use these whenever possible for uniformity in writers. API change (major, because of removed function `metaValueToInlines`. `metaValueToString` wasn't in any released version.)
Diffstat (limited to 'src/Text/Pandoc/Writers/RST.hs')
-rw-r--r--src/Text/Pandoc/Writers/RST.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs
index b416eca59..34d5cce04 100644
--- a/src/Text/Pandoc/Writers/RST.hs
+++ b/src/Text/Pandoc/Writers/RST.hs
@@ -82,10 +82,7 @@ pandocToRST (Pandoc meta blocks) = do
else Nothing
let render' :: Doc -> Text
render' = render colwidth
- let subtit = case lookupMeta "subtitle" meta of
- Just (MetaBlocks [Plain xs]) -> xs
- Just (MetaInlines xs) -> xs
- _ -> []
+ let subtit = lookupMetaInlines "subtitle" meta
title <- titleToRST (docTitle meta) subtit
metadata <- metaToJSON opts
(fmap render' . blockListToRST)