We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
knitr supports class.source and attr.source to add class and attributes on fenced code blocks
class.source
attr.source
Take this example
--- output: rmarkdown::html_document: highlight: pygments --- ```{r select1, class.source = "my-class"} print("Hello there") ```
This is the markdown produced by knitr
```{.r .my-class} print("Hello there") ```
and my-class will be added by Pandoc to <pre> in code block
my-class
<pre>
<div class="sourceCode" id="cb1"> <pre class="sourceCode r my-class"><code class="sourceCode r"> <span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">print</span>(<span class="st">"Hello there"</span>)</span> </code></pre></div>
downlit is not saving the addition classes to put them back in the new <pre> that it creates.
Related to #133 which is slightly related as order of classes on pre messes up downlit_html_path().
pre
downlit_html_path()
A fix should take into account both issues probably
Initially reported in r-lib/pkgdown#2147 by r-lib/pkgdown#2147
The text was updated successfully, but these errors were encountered:
downlit_html_*()
Successfully merging a pull request may close this issue.
knitr supports
class.source
andattr.source
to add class and attributes on fenced code blocksTake this example
This is the markdown produced by knitr
and
my-class
will be added by Pandoc to<pre>
in code blockdownlit is not saving the addition classes to put them back in the new
<pre>
that it creates.Related to #133 which is slightly related as order of classes on
pre
messes updownlit_html_path()
.A fix should take into account both issues probably
Initially reported in r-lib/pkgdown#2147 by r-lib/pkgdown#2147
The text was updated successfully, but these errors were encountered: