aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-08-18 11:40:57 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2017-08-18 11:40:57 -0700
commit7cac58f126402fd965a9a027e13a1cc3446512d9 (patch)
treeba3c57d2c4f49c41fd6c9b8e3bbec46d2c52bdd0 /src/Text
parentbfbdfa646a48147cc7210679f6b17654eec35c5f (diff)
downloadpandoc-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.hs6
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
}