Open noamross opened 5 years ago
Thanks @noamross ! I'll try that out and make sure it works. That's annoying that the type of quote can make a difference, and I'll need to remember to try different types of quotes when I see odd behavior.
Huh, it does work. Even with highlighting on, the date gets created and highlighted properly as long as I use the single quotes.
@rmflight this relates to your problem in #41
When rendering a document with R code in YAML with quotes like this, rendering YAML fails with the warning pandoc warning
[WARNING] Could not parse YAML metadata
:This works if the YAML if placed in single quotes:
This is because, prior to knitting,
redoc
wraps R code in tags that include a quoted class. If you render the document withclean=FALSE
, the pre-processed file will look like this:Currently working on a solution. I previously used pandoc-style native spans, which look like this, but switched to HTML style because something was conflicting with those:
The
yaml
package always defaults to writing single quotes, so maybe I should always re-write header YAML as single quotes to avoid this? In any case, using single quotes will temporarily solve the issue.