Open
Description
Consider the following HTML:
<a href="test.png"><img src="test.png"></a>
The img[src]
attribute is rewritten as expected, but the a[href]
is not, so you get this:
<a href="test.png"><img src="./_file/test.png"></a>
We do rewrite a[href]
attribute when there’s also a[download]
:
We don’t blanketly rewrite a[href]
because it’s often used to link to another page, and pages don’t live in _file
. But we should be able to tell whether a link is a link to a page or not (because we know how to resolve pages) — and for that matter, we want to normalize and rewrite links to pages anyway (to remove .md
and to add .html
for non-clean URLs).