summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/OPML.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-07-01 20:47:26 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-07-01 20:47:26 -0700
commit956425709d63b01c801ebb91dd867a08bfe76eb0 (patch)
tree740467cd43a9d54f4e80bd89e8160ef9776b4f91 /src/Text/Pandoc/Writers/OPML.hs
parent19ad69b1c67e364fbd7740ddadfc01ce25fac56f (diff)
Created Text.Pandoc.Writers.Shared, improved metaToJSON.
* Text.Pandoc.Writers.Shared contains shared functions used only in writers. * metaToJSON now takes a WriterOptions parameter, and will return an empty object if standalone is not specified.
Diffstat (limited to 'src/Text/Pandoc/Writers/OPML.hs')
-rw-r--r--src/Text/Pandoc/Writers/OPML.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/OPML.hs b/src/Text/Pandoc/Writers/OPML.hs
index 951968e2a..f6926c1dc 100644
--- a/src/Text/Pandoc/Writers/OPML.hs
+++ b/src/Text/Pandoc/Writers/OPML.hs
@@ -30,6 +30,7 @@ Conversion of 'Pandoc' documents to OPML XML.
module Text.Pandoc.Writers.OPML ( writeOPML) where
import Text.Pandoc.Definition
import Text.Pandoc.XML
+import Text.Pandoc.Writers.Shared
import Text.Pandoc.Shared
import Text.Pandoc.Options
import Text.Pandoc.Templates (renderTemplate')
@@ -48,11 +49,10 @@ writeOPML opts (Pandoc meta blocks) =
then Just $ writerColumns opts
else Nothing
meta' = B.setMeta "date" (B.str $ convertDate $ docDate meta) meta
- Just metadata = metaToJSON
+ Just metadata = metaToJSON opts
(Just . writeMarkdown def . Pandoc nullMeta)
(Just . trimr . writeMarkdown def . Pandoc nullMeta .
(\ils -> [Plain ils]))
- (writerVariables opts)
meta'
main = render colwidth $ vcat (map (elementToOPML opts) elements)
context = defField "body" main metadata