pandoc/test/command/biblatex-quotes.md
John MacFarlane 547bc2cdf8 Add quotes properly in markdown YAML metadata fields.
This fixes a bug, which caused the writer to look at the LAST
rather than the FIRST character in determining whether quotes
were needed.  So we got spurious quotes in some cases and
didn't get necessary quotes in others.

Closes #7245.  Updated a number of test cases accordingly.
2021-04-25 10:31:33 -07:00

44 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

```
% pandoc -f biblatex -t markdown -s
@comment{excerpt from http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib
\mkbibquote{} should be replaced by a matching set of quotation marks that can be used by citeproc for quote substitution and flipflopping. English smart double quotation marks seem best, as they cannot be confused with apostrophes.
\enquote{}, \enquote*{} should be replaced by a matching set of quotation marks, too: “foo”, bar.
}
@string{pup = {Princeton University Press}}
@book{nussbaum,
Annotation = {A book entry. Note the sorttitle and indexsorttitle fields and the markup of the quotes in the database file},
Author = {Nussbaum, Martha},
Date = 1978,
Hyphenation = {american},
Indexsorttitle = {Aristotle's De Motu Animalium},
Keywords = {secondary},
Location = {Princeton},
Publisher = pup,
Sorttitle = {Aristotle's De Motu Animalium},
Title = {Aristotle's \mkbibquote{De Motu Animalium}}}
^D
---
nocite: "[@*]"
references:
- annote: A book entry. Note the sorttitle and indexsorttitle fields and
the markup of the quotes in the database file
author:
- family: Nussbaum
given: Martha
id: nussbaum
issued: 1978
keyword: secondary
language: en-US
publisher: Princeton University Press
publisher-place: Princeton
title: Aristotle's "De Motu Animalium"
type: book
---
```