diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-08-18 11:40:57 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-08-18 11:40:57 -0700 |
commit | 7cac58f126402fd965a9a027e13a1cc3446512d9 (patch) | |
tree | ba3c57d2c4f49c41fd6c9b8e3bbec46d2c52bdd0 /src/Text | |
parent | bfbdfa646a48147cc7210679f6b17654eec35c5f (diff) | |
download | pandoc-7cac58f126402fd965a9a027e13a1cc3446512d9.tar.gz |
Markdown reader: parse `-@roe` as suppress-author citation.
Previously only `[-@roe]` (with brackets) was recognized as
suppress-author, and `-@roe` was treated the same as `@roe`.
Closes jgm/pandoc-citeproc#237.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 1bcf1cfae..cc9e9b71f 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1971,11 +1971,13 @@ cite = do textualCite :: PandocMonad m => MarkdownParser m (F Inlines) textualCite = try $ do - (_, key) <- citeKey + (suppressAuthor, key) <- citeKey let first = Citation{ citationId = key , citationPrefix = [] , citationSuffix = [] - , citationMode = AuthorInText + , citationMode = if suppressAuthor + then SuppressAuthor + else AuthorInText , citationNoteNum = 0 , citationHash = 0 } |