git.iko.soy/typeable/pandoc
on master help sign in
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>>`

commit07bb41d6da2c4c3566acb447413da3fbcc6c0949 authorMatthew Pickering <matthewtpickering@gmail.com> dateFri 8 Aug 2014, 00:11 (12 years ago) parent482f7f8
1 file changed+2
src/Text/Pandoc/Writers/Org.hs+2
src/Text/Pandoc/Writers/Org.hs+2
@@ -238,6 +238,8 @@ inlineListToOrg lst = mapM inlineToOrg lst >>= return . hcat
238238
239239-- | Convert Pandoc inline element to Org.
240240inlineToOrg :: Inline -> State WriterState Doc
241+inlineToOrg (Span (uid, [], []) []) =
242+ return $ "<<" <> text uid <> ">>"
241243inlineToOrg (Span _ lst) =
242244 inlineListToOrg lst
243245inlineToOrg (Emph lst) = do