From 9ead748cc9cd79a8f490776d4d5dfe6cd0beb6f1 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 8 Dec 2010 08:17:44 -0800 Subject: RST reader: Added footnote suppport. Resolves issue #258. Note that there are some differences in how docutils and pandoc treat footnotes. Currently pandoc ignores the numeral or symbol used in the note; footnotes are put in an auto-numbered ordered list. --- tests/rst-reader.native | 8 +++++++- tests/rst-reader.rst | 28 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/rst-reader.native b/tests/rst-reader.native index 2cb0ef8ae..5ece59eb3 100644 --- a/tests/rst-reader.native +++ b/tests/rst-reader.native @@ -308,4 +308,10 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ": , Para [Str "r1",Space,Str "bis"] ], [ BulletList [ [ Plain [Str "b"] ] , [ Plain [Str "b",Space,Str "2"] ] - , [ Plain [Str "b",Space,Str "2"] ] ] ], [ Plain [Str "c",Space,Str "c",Space,Str "2",Space,Str "c",Space,Str "2"] ] ] ] ] + , [ Plain [Str "b",Space,Str "2"] ] ] ], [ Plain [Str "c",Space,Str "c",Space,Str "2",Space,Str "c",Space,Str "2"] ] ] ] +, Header 1 [Str "Footnotes"] +, Para [Note [Para [Str "Note",Space,Str "with",Space,Str "one",Space,Str "line",Str "."]]] +, Para [Note [Para [Str "Note",Space,Str "with",Space,Str "continuation",Space,Str "line",Str "."]]] +, Para [Note [Para [Str "Note",Space,Str "with"],Para [Str "continuation",Space,Str "block",Str "."]]] +, Para [Note [Para [Str "Note",Space,Str "with",Space,Str "continuation",Space,Str "line"],Para [Str "and",Space,Str "a",Space,Str "second",Space,Str "para",Str "."]]] +, Para [Str "Not",Space,Str "in",Space,Str "note",Str "."] ] diff --git a/tests/rst-reader.rst b/tests/rst-reader.rst index 8c4b7d726..519f0080c 100644 --- a/tests/rst-reader.rst +++ b/tests/rst-reader.rst @@ -508,3 +508,31 @@ Multiple blocks in a cell | | - b 2 | c 2 | | r1 bis | - b 2 | c 2 | +------------------+-----------+------------+ + +Footnotes +========= + +[1]_ + +[#]_ + +[#]_ + +[*]_ + +.. [1] Note with one line. + +.. [#] Note with + continuation line. + +.. [#] Note with + + continuation block. + +.. [*] Note with + continuation line + + and a second para. + +Not in note. + -- cgit v1.2.3