I raised an issue on SO I came along when trying to use the !expr syntax in my rmarkdown YAML header.
While this compiles w/o any problem:
navbar:
- title: !expr Sys.Date()
href: "#"
align: right
this throws an error:
navbar:
- title: !expr format(Sys.Date(), "Created on: %Y-%d-%m")
href: "#"
align: right
After some trial and error, I figured that the colon followed by a space : is the culprit, and I found a workaround by replacing the colon by its Unicode representation:
navbar:
- title: !expr format(Sys.Date(), "Created on\U003A %Y-%d-%m")
href: "#"
align: right
The least we can do is to highlight this in the documentation.
I raised an issue on SO I came along when trying to use the
!exprsyntax in my rmarkdown YAML header.While this compiles w/o any problem:
this throws an error:
After some trial and error, I figured that the colon followed by a space
:is the culprit, and I found a workaround by replacing the colon by its Unicode representation:The least we can do is to highlight this in the documentation.