Skip to content

Add YAML quoting guidance for keywords with spaces in MANUAL.txt #11507

@marekkowalczyk

Description

@marekkowalczyk

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):

pandoc/MANUAL.txt

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:

pandoc/MANUAL.txt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions