diff options
| author | John MacFarlane <[email protected]> | 2022-09-18 19:17:48 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2022-09-18 19:17:48 -0700 |
| commit | c0ff59c272109d863beefcef0f796f758eaa8c84 (patch) | |
| tree | c98bf3b92753cdf3299b1d7c251ef212d6e12037 /test/command | |
| parent | 311a3406878d4f02ffe4c087ece82f9d4156ff92 (diff) | |
BibTeX parser: fix handling of `%` in url field.
`%` does not function as a comment character inside `url`
(where URL-encoding is common).
Commit 6fb2973a582116cd515c6f7e68794cca22955511 mistakenly
took this reassignment of `%` to be a general feature of
braced (but not quoted) BibTeX fields.
This commit restores the correct behavior of `%` in braced fields
other than `url`, and corrects the behavior of `%` in `url`
when the value is quoted.
Closes #7678 (again).
Diffstat (limited to 'test/command')
| -rw-r--r-- | test/command/7678.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/command/7678.md b/test/command/7678.md new file mode 100644 index 000000000..b6a09ef20 --- /dev/null +++ b/test/command/7678.md @@ -0,0 +1,31 @@ +``` +% pandoc -f bibtex -t csljson +@misc{doe, + author = "Jane Doe", + title = "Work", + year = "2021", + url = "%20and%20" +} +^D +[ + { + "URL": "%20and%20", + "author": [ + { + "family": "Doe", + "given": "Jane" + } + ], + "id": "doe", + "issued": { + "date-parts": [ + [ + 2021 + ] + ] + }, + "title": "Work", + "type": "" + } +] +``` |
