-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Description
The Pandoc MANUAL.txt lacks clear guidance on properly escaping keywords containing spaces in YAML frontmatter, specifically for the keywords field. This may lead to parsing errors for users when keywords like "bug fix" or "user interface" are used without quotes.
Affected locations
Line 2794 (general keywords description):
Line 2794 in 15ddf41
| `keywords` |
text
`keywords`
: list of keywords to be included in HTML, PDF, ODT, pptx, docx
and AsciiDoc metadata; repeat as for `author`, above
Missing: Mention that keywords with spaces require double quotes in flow style.
Lines 5111+ (YAML examples section), especially line 5124:
Line 5124 in 15ddf41
| keywords: [nothing, nothingness] |
keywords: [nothing, nothingness]
Missing: Example showing quoted keywords with spaces.
Suggested fix
At line 2794, update to:
`keywords`
: list of keywords to be included in HTML, PDF, ODT, pptx, docx
and AsciiDoc metadata; repeat as for `author`, above.
Keywords with spaces must be quoted: `keywords: ["bug fix", "user interface"]`.
In the YAML examples section (around line 5124), add:
keywords: [nothing, nothingness, "bug fix", "user interface"]
Why this matters
Unquoted keywords with spaces (keywords: [bug fix, user interface]) cause YAML parsing failures
Flow style [] is commonly used for brevity, but requires proper quoting
Current examples may imply unquoted spaces work, which may be incorrect.