git.iko.soy/typeable/pandoc
on master help sign in
AsciiDoc writer: support anchors in spans with id elements.
e4b3da6John MacFarlane
src/Text/Pandoc/Writers/AsciiDoc.hs+5−1
@@ -445,4 +445,8 @@ inlineToAsciiDoc opts (Note [Plain inlines]) = do
445 return $ text "footnote:[" <> contents <> "]"
445 return $ text "footnote:[" <> contents <> "]"
446-- asciidoc can't handle blank lines in notes
446-- asciidoc can't handle blank lines in notes
447inlineToAsciiDoc _ (Note _) = return "[multiblock footnote omitted]"
447inlineToAsciiDoc _ (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+