Feature request
Add ability to preserve both link's text and url, like: [Link](https://website.com) -> Link (https://website.com).
Description
Now there is the only option to chose between keeping text or url from md links (replaceLinksWithURL).
Sometimes it needs to preserve both text and url from links, which especially useful in hidden fields for screen readers, crawlers, accessibility functionality and AI agents.
For those places, keeping only URL may look odd:
Please visit our [schedule](http://website/link) for... -> Please visit our http://website/link for...
and doesn't make sense.
I would like to have an option to keep both parts and put the link between parentheses (discussable).
Proposal
- Add an option (e.g.
preserveLinksUrl: boolean), which enables described behavior;
- When the option is enabled, MD links are rendered in the following way:
[Link text](http://website.com) -> Link text (http://website.com);
- No older features are affected to ensure backward compatibility.
Optional
- Add callback option to have an ability to redefine rendering for specific md parts: headers, lists, list items, links, etc.
- callback function should accept type of entity and entity itself as arguments
- the function should return string as the desired rendering result
Feature request
Add ability to preserve both link's text and url, like:
[Link](https://website.com)->Link (https://website.com).Description
Now there is the only option to chose between keeping text or url from md links (
replaceLinksWithURL).Sometimes it needs to preserve both text and url from links, which especially useful in hidden fields for screen readers, crawlers, accessibility functionality and AI agents.
For those places, keeping only URL may look odd:
Please visit our [schedule](http://website/link) for...->Please visit our http://website/link for...and doesn't make sense.
I would like to have an option to keep both parts and put the link between parentheses (discussable).
Proposal
preserveLinksUrl: boolean), which enables described behavior;[Link text](http://website.com)->Link text (http://website.com);Optional