pkgdown icon indicating copy to clipboard operation
pkgdown copied to clipboard

Support tweak link to Markdown with anchor

Open rgaiacs opened this issue 2 years ago • 0 comments

Consider the follow minimal README.md:

[foo](foo.md)

[bar]{bar.md#awesome)

pkgdown::build_site() will convert it to

<a href="foo.html">foo</a>

<a href="bar.md#awesome">bar</a>

instead of

<a href="foo.html">foo</a>

<a href="bar.html#awesome">bar</a>

This happen because in https://github.com/r-lib/pkgdown/blob/39083f38bbb2de2e1126529392bddf3e6e262ab4/R/tweak-tags.R#L46 we expect the link to end with .md.

Can we support links that include an anchor? Thanks!

rgaiacs avatar Jun 01 '23 15:06 rgaiacs