From 07bb41d6da2c4c3566acb447413da3fbcc6c0949 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Fri, 8 Aug 2014 00:11:02 +0100 Subject: 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 `<>` --- src/Text/Pandoc/Writers/Org.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Text/Pandoc/Writers') 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 -- cgit v1.2.3