git.iko.soy/typeable/pandoc
on master help sign in
Added tests for implicit header references.
commit5a4f7ec595cb3c141d372c967a75c956a9173dc1 authorJohn MacFarlane <fiddlosopher@gmail.com> dateThu 3 Jan 2013, 20:43 (14 years ago) parentc435e9c
2 files changed+21−1
tests/markdown-reader-more.native+7−1 tests/markdown-reader-more.txt+14
tests/markdown-reader-more.native+7−1
@@ -57,4 +57,10 @@
5757 ,[Plain [Str "two"]]]
5858,OrderedList (1,LowerAlpha,Period)
5959 [[Plain [Str "one"]]
60− ,[Plain [Str "two"]]]]
60+ ,[Plain [Str "two"]]]
61+,Header 2 [Str "Implicit",Space,Str "header",Space,Str "references"]
62+,Header 3 [Str "My",Space,Str "header"]
63+,Header 3 [Str "My",Space,Str "other",Space,Str "header"]
64+,Para [Str "A",Space,Str "link",Space,Str "to",Space,Link [Str "My",Space,Str "header"] ("#my-header",""),Str "."]
65+,Para [Str "Another",Space,Str "link",Space,Str "to",Space,Link [Str "it"] ("#my-header",""),Str "."]
66+,Para [Str "But",Space,Str "this",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "link",Space,Str "to",Space,Link [Str "My",Space,Str "other",Space,Str "header"] ("/foo",""),Str ",",Space,Str "since",Space,Str "the",Space,Str "reference",Space,Str "is",Space,Str "defined."]]
tests/markdown-reader-more.txt+14
@@ -133,3 +133,17 @@ $\tuple{x,y}$
133133
134134 a. one
135135 b. two
136+
137+## Implicit header references
138+
139+### My header
140+
141+### My other header
142+
143+A link to [My header].
144+
145+Another link to [it][My header].
146+
147+[my other header]: /foo
148+
149+But this is not a link to [My other header], since the reference is defined.