Markdown citations: don't strip off initial space in locator.
Previously `[@item1 and nowhere else]` yielded the locator ", and nowhere else", or, with the new citeproc-hs, "and nowhere else". Now it yields " and nowhere else".
This commit is contained in:
parent
6a51897f33
commit
d74e8d14a5
3 changed files with 7 additions and 3 deletions
|
@ -1321,8 +1321,12 @@ citeKey = try $ do
|
|||
|
||||
suffix :: GenParser Char ParserState [Inline]
|
||||
suffix = try $ do
|
||||
hasSpace <- option False (notFollowedBy nonspaceChar >> return True)
|
||||
spnl
|
||||
liftM normalizeSpaces $ many $ notFollowedBy (oneOf ";]") >> inline
|
||||
rest <- liftM normalizeSpaces $ many $ notFollowedBy (oneOf ";]") >> inline
|
||||
return $ if hasSpace
|
||||
then Space : rest
|
||||
else rest
|
||||
|
||||
prefix :: GenParser Char ParserState [Inline]
|
||||
prefix = liftM normalizeSpaces $
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
- Citation with a suffix and locator (Doe 2005, 33, 35–37, and nowhere else).
|
||||
|
||||
- Citation with suffix only (Doe 2005, and nowhere else).
|
||||
- Citation with suffix only (Doe 2005 and nowhere else).
|
||||
|
||||
- Now some modifiers.[^3]
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ Doe, John, and Jenny Roe, ‘Why Water Is Wet’, in *Third Book*, ed by Sam Smi
|
|||
|
||||
[^9]: Doe, First Book, pp. 33, 35-37, and nowhere else.
|
||||
|
||||
[^10]: Doe, First Book, and nowhere else.
|
||||
[^10]: Doe, First Book and nowhere else.
|
||||
|
||||
[^11]: Like a citation without author: First Book, and now Doe with a locator Article, 33-34 (p. 44).
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue