diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-11-14 15:00:17 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-11-14 15:00:17 -0800 |
commit | b8d17f7ae8ed37784adcfaa4f89d0d28f52fffff (patch) | |
tree | b1319041b8f6f17efe4432d1306129e38fa9e9ab /test/command | |
parent | 68b298ed9aee405033da9a2b44ae86f2241a123d (diff) | |
download | pandoc-b8d17f7ae8ed37784adcfaa4f89d0d28f52fffff.tar.gz |
Markdown reader: don't increment stateNoteNumber for example refs.
Background: syntactically, references to example list items
can't be distinguished from citations; we only know which they
are after we've parsed the whole document (and this is resolved
in the `runF` stage).
This means that pandoc's calculation of `citationNoteNum`
can sometimes be wrong when there are example list references.
This commit partially addresses #6836, but only for the case
where the example list references refer to list items defined
previously in the document.
Diffstat (limited to 'test/command')
-rw-r--r-- | test/command/6836.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/command/6836.md b/test/command/6836.md new file mode 100644 index 000000000..c35048045 --- /dev/null +++ b/test/command/6836.md @@ -0,0 +1,17 @@ +``` +pandoc -t native +[@buchanan] + +(@foo) + +See @foo. + +[@buchanan] +^D +[Para [Cite [Citation {citationId = "buchanan", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 1, citationHash = 0}] [Str "[@buchanan]"]] +,OrderedList (1,Example,TwoParens) + [[]] +,Para [Str "See",Space,Str "1."] +,Para [Cite [Citation {citationId = "buchanan", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 2, citationHash = 0}] [Str "[@buchanan]"]]] +``` + |