Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata file parse errors cause silent failure? #6730

Closed
wlupton opened this issue Oct 7, 2020 · 0 comments
Closed

Metadata file parse errors cause silent failure? #6730

wlupton opened this issue Oct 7, 2020 · 0 comments

Comments

@wlupton
Copy link
Contributor

wlupton commented Oct 7, 2020

Apologies if this is known and has already been fixed. It seems that if there are errors in supplied metadata files then the errors aren't reported, the metadata in the file is ignored (or perhaps only that as-yet unparsed; not sure) and processing proceeds.

In the example below, you can see that title must be being ignored in the first case.

lewa:pandoc% pandoc --version
pandoc 2.9.2.1
lewa:pandoc% cat bad.yaml 
var: This: has: colons:
title: This should be the title
lewa:pandoc% cat good.yaml 
var: 'This: has: colons:'
title: This should be the title
lewa:pandoc% cat document.md
This is a document.
lewa:pandoc% pandoc --standalone --metadata-file bad.yaml document.md --output document.html
[WARNING] This document format requires a nonempty <title> element.
  Defaulting to 'document' as the title.
  To specify a title, use 'title' in metadata or --metadata title="...".
lewa:pandoc% pandoc --standalone --metadata-file good.yaml document.md --output document.html
@jgm jgm closed this as completed in 428f8b4 Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant