diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-08-08 23:14:12 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-08-08 23:14:12 -0700 |
commit | e9de0f0e22b9b64b5684efe81d03539c3f57a71c (patch) | |
tree | 6a5f6a6ad5d4cf95f4e3ea3106a7db9c1a97b547 /src/Text/Pandoc/Writers/Man.hs | |
parent | 99bb066bb925134b506d39c8d6694fe81337d9c1 (diff) | |
download | pandoc-e9de0f0e22b9b64b5684efe81d03539c3f57a71c.tar.gz |
Preliminary support for new Div and Span elements in writers.
Currently these are "transparent" containers, except in HTML,
where they produce div and span elements with attributes.
Diffstat (limited to 'src/Text/Pandoc/Writers/Man.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/Man.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Man.hs b/src/Text/Pandoc/Writers/Man.hs index 0508b6c27..ed66c7c2b 100644 --- a/src/Text/Pandoc/Writers/Man.hs +++ b/src/Text/Pandoc/Writers/Man.hs @@ -160,6 +160,7 @@ blockToMan :: WriterOptions -- ^ Options -> Block -- ^ Block element -> State WriterState Doc blockToMan _ Null = return empty +blockToMan opts (Div _ bs) = blockListToMan opts bs blockToMan opts (Plain inlines) = liftM vcat $ mapM (inlineListToMan opts) $ splitSentences inlines blockToMan opts (Para inlines) = do @@ -300,6 +301,7 @@ inlineListToMan opts lst = mapM (inlineToMan opts) lst >>= (return . hcat) -- | Convert Pandoc inline element to man. inlineToMan :: WriterOptions -> Inline -> State WriterState Doc +inlineToMan opts (Span _ ils) = inlineListToMan opts ils inlineToMan opts (Emph lst) = do contents <- inlineListToMan opts lst return $ text "\\f[I]" <> contents <> text "\\f[]" |