> out <- downlit_html_path(test_path("autolink.html"), tempfile())
> cat(brio::read_lines(out), sep = "\n")
<!DOCTYPE html>
<html><body>

<!-- Should get linked -->
<pre class="downlit sourceCode r">
<code class="sourceCode R"><span></span>
<span><span class="co"># This is a comment</span></span>
<span></span>
<span><span class="fu">stats</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/r/stats/median.html">median</a></span><span class="op">(</span><span class="op">)</span></span></code></pre>
<p><code><a href="https://rdrr.io/r/stats/median.html">stats::median()</a></code></p>

<!-- Shouldn't get linked -->
<h1><code>stats::median()</code></h1>
<a><code>stats::median()</code></a>
<details><summary><code>stats::median()</code></summary></details>
</body></html>

