mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 15:44:59 +08:00
Make implicit_header_references work with explicit header ids.
(Markdown reader.)
This commit is contained in:
@@ -61,8 +61,9 @@
|
||||
,Header 2 ("implicit-header-references",[],[]) [Str "Implicit",Space,Str "header",Space,Str "references"]
|
||||
,Header 3 ("my-header-1",[],[]) [Str "My",Space,Str "header"]
|
||||
,Header 3 ("my-other-header",[],[]) [Str "My",Space,Str "other",Space,Str "header"]
|
||||
,Para [Str "A",Space,Str "link",Space,Str "to",Space,Link [Str "My",Space,Str "header"] ("#my-header",""),Str "."]
|
||||
,Para [Str "Another",Space,Str "link",Space,Str "to",Space,Link [Str "it"] ("#my-header",""),Str "."]
|
||||
,Para [Str "A",Space,Str "link",Space,Str "to",Space,Link [Str "My",Space,Str "header"] ("#my-header-1",""),Str "."]
|
||||
,Para [Str "Another",Space,Str "link",Space,Str "to",Space,Link [Str "it"] ("#my-header-1",""),Str "."]
|
||||
,Para [Str "Link",Space,Str "to",Space,Link [Str "Explicit",Space,Str "header",Space,Str "attributes"] ("#foobar",""),Str "."]
|
||||
,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."]
|
||||
,Header 2 ("foobar",["baz"],[("key","val")]) [Str "Explicit",Space,Str "header",Space,Str "attributes"]
|
||||
,Header 2 ("line-blocks",[],[]) [Str "Line",Space,Str "blocks"]
|
||||
|
||||
@@ -144,6 +144,8 @@ A link to [My header].
|
||||
|
||||
Another link to [it][My header].
|
||||
|
||||
Link to [Explicit header attributes].
|
||||
|
||||
[my other header]: /foo
|
||||
|
||||
But this is not a link to [My other header], since the reference is defined.
|
||||
|
||||
Reference in New Issue
Block a user