git.iko.soy/typeable/pandoc
on master help sign in
AsciiDoc writer: support anchors in spans with id elements.
commite4b3da6929984478cc9a1c462deb8d7a675e5928 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 13 Dec 2015, 09:02 (11 years ago) parent3e079a2
1 file changed+5−1
src/Text/Pandoc/Writers/AsciiDoc.hs+5−1
src/Text/Pandoc/Writers/AsciiDoc.hs+5−1
@@ -445,4 +445,8 @@ inlineToAsciiDoc opts (Note [Plain inlines]) = do
445445 return $ text "footnote:[" <> contents <> "]"
446446-- asciidoc can't handle blank lines in notes
447447inlineToAsciiDoc _ (Note _) = return "[multiblock footnote omitted]"
448−inlineToAsciiDoc opts (Span _ ils) = inlineListToAsciiDoc opts ils
448+inlineToAsciiDoc opts (Span (ident,_,_) ils) = do
449+ let identifier = if (null ident) then empty else ("[[" <> text ident <> "]]")
450+ contents <- inlineListToAsciiDoc opts ils
451+ return $ identifier <> contents
452+