ropensci / tinkr

Convert (R)Markdown files to XML, edit them, write them back as (R)Markdown
https://docs.ropensci.org/tinkr
GNU General Public License v3.0
57 stars 3 forks source link

protect Hugo shortcodes? #90

Open maelle opened 1 year ago

maelle commented 1 year ago

This

{{< figure src="blop.jpg" title="how *nice* is this pic?!" alt="Portrait of a corgi sleeping" caption="Pic by someone">}}

becomes

{{\< figure src="blop.jpg" title="how *nice* is this pic?!" alt="Portrait of a corgi sleeping" caption="Pic by someone">}}

unless one protects it in the Markdown file:


```{=html}
{{< figure src="blop.jpg" title="how *nice* is this pic?!" alt="Portrait of a corgi sleeping" caption="Pic by someone">}}


should tinkr support some sort of protection?
zkamvar commented 1 year ago

This protection can be offered by a similar mechanism as the protection for square braces

zkamvar commented 1 year ago

Though I don't know if I'm going to get this in in time for the CRAN release. I'm sorry I missed these. I think I was in Germany at the time and then had a vacation afterwards and then had to deal with {renv} updates.

maelle commented 1 year ago

no problem, especially since there is a workaround (the Pandoc raw attribute)