Currently, the plugin only transforms urls on href for anchor elements that are immediate children of the root node in the tree.
It would be possible to transform any url that points to an md/mdxfile regardless of where it "lives" in the tree and/or what type oftag type` it is.
For example, if the markdown contains the following, the transform will not occur:
This is a manual <a href="./my-post.md">My Post</a> anchor element
A couple of ways this could be approached:
Leave currently functionality as-is, only transform on markdown style links (e.g., my link
Expand to include any href on any anchor element within the document
Expand to include any url
Option 2 & 3 could be baked in or exposed via some test option that allows a function to be passed to determine if the url should be transformed or not.
This is definitely a nice to have I think but wanted to log it for future consideration.
Currently, the plugin only transforms
urls
onhref
foranchor elements
that are immediate children of the root node in the tree.It would be possible to transform any
url
that points to an md/mdxfile regardless of where it "lives" in the tree and/or what type of
tag type` it is.For example, if the markdown contains the following, the transform will not occur:
A couple of ways this could be approached:
markdown style links
(e.g., my linkhref
on anyanchor element
within the documenturl
Option 2 & 3 could be baked in or exposed via some
test
option that allows a function to be passed to determine if the url should be transformed or not.This is definitely a nice to have I think but wanted to log it for future consideration.