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.
This commit is contained in:
John MacFarlane 2017-08-18 11:40:57 -07:00
parent bfbdfa646a
commit 7cac58f126

View file

@ -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
}