I am not sure if this is the right place to ask my question. If it is not, please advise me where to ask.
I have problems using fenced divs with blogdown Academic theme explained in R Markdown Cookbook. It works in a new installation of blogdown with Xmin, as I tested. But in the Academic theme, whenever I save, the curly brake gets protected by a backslash.
This may or may not be helpful, but I just spent >24hr troubleshooting what may be a similar problem on a cluster so I'll share:
For me documents rendered fine via RStudio Server, but not from the R CLI. Fenced divs were the biggest issue.
My problem came down to pandoc version - I discovered RStudio (Server?) sets an environment variable that directs knitting to an bundled pandoc executable. My problem was solved by prepending the path to the newer version of pandoc into my PATH variable on the command line.
Is it possible your Hugo project has cached environment variables which don't include a reference to a suitable pandoc version?
Thank you @sturu for sharing your experiences. I am using the same pandoc/Hugo installation with the Xmin Hugo theme where fenced divs do work. So I don't think that the problem is related to the pandoc version.
I can't reproduce on a new academic blogdown site. Using the template, I add the fenced div and when I knit it renders correct in the resulting HTML file contains in the post folder.
When you say the fenced div "becomes", you mean in the resulting HTML file ?