Open etiennebacher opened 4 weeks ago
In .rd2qmd()
, we may also want to keep the HTML as-is (for example not replacing heading tags by markdown syntax) and then wrap the whole thing in {=html}
so that Quarto parses this as raw HTML.
Would this work for multiline code blocks or just inline?
I think the issue is just for inline code. For code blocks, the quotation marks are normal: https://pola-rs.github.io/r-polars/vignettes/polars.html#series-and-dataframes
Right. I just wanted to be sure that on the intermediate representation, we never had <code>
tags around blocks code. Replacing those by single ticks might break things.
Perhaps that never happens and isn't a concern.
Replacing those by single ticks might break things.
Hopefully the snapshot tests would catch that. If they don't, something is wrong with them
Wrapping everything in {=html}
(except for examples that would be in {r}
) works almost perfectly. The problem is equations since they are wrapped in <code class="reqn">
. When this is evaluated as raw HTML then it just gives the latex code but doesn't evaluate it. I put some WIP here but it's mostly so that it's not lost since I don't find a good fix for this: https://github.com/etiennebacher/altdoc/pull/291
Replacing <code>
by backticks is almost perfect but it means that there would be a mix of HTML and markdown syntax for example if there is code in the "Arguments" table. Some doc tools, e.g docute
, don't support that and just show the backticks without formatting.
This could help fix formatting of quotation marks in code, e.g. pola-rs/r-polars/issues/655
Cf https://github.com/quarto-dev/quarto-cli/issues/10511