Closed yorkxin closed 4 months ago
The Turndown library doesn't seem to provide such a feature that resolves relative paths to absolute URLs.
It might be easier to just traverse through all the <a>
and <img>
tags, then convert URLs to absolute ones.
Summary
When using Copy Selection as Markdown (introduced in #132 ), links still use relative links.
Since the result Markdown code is intended to be used in external documents, it is necessary to resolve relative links.
Reproduction Steps
Expected Behavior
[RFC 2606]
. It should link to an absolute URL.Actual Behavior
Reproducible Environment