diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2014-08-08 00:11:02 +0100 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2014-08-08 00:20:18 +0100 |
commit | 07bb41d6da2c4c3566acb447413da3fbcc6c0949 (patch) | |
tree | 0736fda1e9ed2e3e9bc39452ca6c4d67380f3c12 /src/Text/Pandoc/Writers | |
parent | 482f7f8e157b713b5dcf81303844721d827b16de (diff) | |
download | pandoc-07bb41d6da2c4c3566acb447413da3fbcc6c0949.tar.gz |
Org Writer: Write anchor elements
The Org Writer now writes empty span elements which have an id as an anchor.
For example `Span ("uid", [], []) []` becomes `<<uid>>`
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/Org.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs index 87046537c..414883b29 100644 --- a/src/Text/Pandoc/Writers/Org.hs +++ b/src/Text/Pandoc/Writers/Org.hs @@ -238,6 +238,8 @@ inlineListToOrg lst = mapM inlineToOrg lst >>= return . hcat -- | Convert Pandoc inline element to Org. inlineToOrg :: Inline -> State WriterState Doc +inlineToOrg (Span (uid, [], []) []) = + return $ "<<" <> text uid <> ">>" inlineToOrg (Span _ lst) = inlineListToOrg lst inlineToOrg (Emph lst) = do |