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

Report rendered with pandoc>=2.6 has quotes around title, author, and date #68

Closed
ressy opened this issue Feb 10, 2022 · 3 comments · Fixed by #69
Closed

Report rendered with pandoc>=2.6 has quotes around title, author, and date #68

ressy opened this issue Feb 10, 2022 · 3 comments · Fixed by #69
Labels
Milestone

Comments

@ressy
Copy link
Member

ressy commented Feb 10, 2022

Something in the YAML parsing has changed between pandoc 2.5 and 2.6 so that the --metadata=key:val arguments we give keep internal quotes rather than parsing them as encapsulating strings.

In render_report:

rmarkdown::render(fp_report_in, quiet = TRUE, output_file = fp_report_out,
                      output_options = list(pandoc_args = pandoc_args))

If pandoc_args contains --metadata=title:"report title", the quotes would be parsed out in pandoc < 2.6 but kept in pandoc>=2.6.

I'm not sure the quotes were ever actually necessary (they'd be optional in YAML anyway, and these pandoc arguments are already handled as a vector so word-splitting shouldn't be an issue).

@ressy ressy added the bug label Feb 10, 2022
@ressy ressy added this to the Version 0.4.0 milestone Feb 10, 2022
@ressy
Copy link
Member Author

ressy commented Feb 10, 2022

Possibly related: jgm/pandoc#5177

@ressy
Copy link
Member Author

ressy commented Feb 10, 2022

On second thought... whether or not the quotes would be optional according to YAML would depend on the string value, which was probably my thinking when I put the quotes there in the first place. The latest pandoc code is more accommodating than YAML itself would be, though, and recognizes boolean values first and everything else as-is as a string (quotes included).

...but wait, the previous pandoc behavior casts all-but-bool to string anyway, so no, the quotes were probably never needed, practically speaking. Removing them should then produce the same behavior here no matter the pandoc version.

@ressy
Copy link
Member Author

ressy commented Feb 10, 2022

There, in e471ed6 both report.html CircleCI artifacts under newer and older pandoc don't have extra quotes on those fields. That should do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant