Handle % in biblatex doi field.

Closes #8595.
This commit is contained in:
John MacFarlane
2023-02-01 14:20:05 -08:00
parent 58dfc3115a
commit 1a7146ba70
2 changed files with 37 additions and 2 deletions
+6 -2
View File
@@ -915,8 +915,12 @@ entField = do
spaces'
char '='
spaces'
let inQ = if k == "url" then inQuotesURL else inQuotes
let inB = if k == "url" then inBracesURL else inBraces
let inQ = if k == "url" || k == "doi"
then inQuotesURL
else inQuotes
let inB = if k == "url" || k == "doi"
then inBracesURL
else inBraces
vs <- (expandString <|> inQ <|> inB <|> rawWord) `sepBy`
try (spaces' >> char '#' >> spaces')
spaces'
+31
View File
@@ -29,3 +29,34 @@
}
]
```
```
% pandoc -f bibtex -t csljson
@misc{doe,
author = "Jane Doe",
title = "Work",
year = "2021",
doi = "%20and%20"
}
^D
[
{
"DOI": "%20and%20",
"author": [
{
"family": "Doe",
"given": "Jane"
}
],
"id": "doe",
"issued": {
"date-parts": [
[
2021
]
]
},
"title": "Work",
"type": ""
}
]
```