diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-01-10 12:07:33 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-01-10 12:07:33 -0800 |
commit | 49007ded7b7a64cf9c875f23e9c59a966e1284c8 (patch) | |
tree | d36e3ef74387291d1f15d91f18e2296260791261 /test/command | |
parent | 13f7c2cf83c74c3dd22f355111d856fbfe7d3378 (diff) | |
download | pandoc-49007ded7b7a64cf9c875f23e9c59a966e1284c8.tar.gz |
RST reader: better handling for headers with an anchor.
Instead of creating a div containing the header, we put
the id directly on the header. This way header promotion
will work properly. Closes #4240.
Diffstat (limited to 'test/command')
-rw-r--r-- | test/command/4240.md | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/command/4240.md b/test/command/4240.md new file mode 100644 index 000000000..39a7d2adf --- /dev/null +++ b/test/command/4240.md @@ -0,0 +1,33 @@ +``` +% pandoc -f rst -s -t native +===== +Title +===== + +-------- +Subtitle +-------- + +header1 +======= + +header2 +------- + +.. _id: + +header3 +~~~~~~~ + +.. _id2: +.. _id3: + +header4 +~~~~~~~ +^D +Pandoc (Meta {unMeta = fromList [("subtitle",MetaInlines [Str "Subtitle"]),("title",MetaInlines [Str "Title"])]}) +[Header 1 ("header1",[],[]) [Str "header1"] +,Header 2 ("header2",[],[]) [Str "header2"] +,Header 3 ("id",[],[]) [Str "header3"] +,Header 3 ("id3",[],[]) [Str "header4",Span ("id2",[],[]) []]] +``` |