diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-12-13 09:02:37 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-12-13 09:02:37 -0800 |
commit | e4b3da6929984478cc9a1c462deb8d7a675e5928 (patch) | |
tree | 9f97a5474d0447a4a8bc0420fbbb619dfc5f2671 /src | |
parent | 3e079a25bce7165a618f01d2e7625bab4ca33b6b (diff) | |
download | pandoc-e4b3da6929984478cc9a1c462deb8d7a675e5928.tar.gz |
AsciiDoc writer: support anchors in spans with id elements.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/AsciiDoc.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/AsciiDoc.hs b/src/Text/Pandoc/Writers/AsciiDoc.hs index b767aa669..4ac6aa093 100644 --- a/src/Text/Pandoc/Writers/AsciiDoc.hs +++ b/src/Text/Pandoc/Writers/AsciiDoc.hs @@ -445,4 +445,8 @@ inlineToAsciiDoc opts (Note [Plain inlines]) = do return $ text "footnote:[" <> contents <> "]" -- asciidoc can't handle blank lines in notes inlineToAsciiDoc _ (Note _) = return "[multiblock footnote omitted]" -inlineToAsciiDoc opts (Span _ ils) = inlineListToAsciiDoc opts ils +inlineToAsciiDoc opts (Span (ident,_,_) ils) = do + let identifier = if (null ident) then empty else ("[[" <> text ident <> "]]") + contents <- inlineListToAsciiDoc opts ils + return $ identifier <> contents + |