Is there a way to render links in such a way that they will open in new window ? #486

Open
opened 2026-01-29 14:37:57 +00:00 by claunia · 0 comments
Owner

Originally created by @macmarek on GitHub (Dec 2, 2021).

Hey,
I'm trying to make sure that all links generated by Markdig are opening in a new browser window. Is there a way to achieve this?

Example:
I'd like
[stackoverflow.com](https://stackoverflow.com/)

to be rendered as
<a href="https://stackoverflow.com/" target="_blank">stackoverflow.com</a>

instead of
<a href="https://stackoverflow.com/">stackoverflow.com</a>

Originally created by @macmarek on GitHub (Dec 2, 2021). Hey, I'm trying to make sure that all links generated by Markdig are opening in a new browser window. Is there a way to achieve this? Example: I'd like ```[stackoverflow.com](https://stackoverflow.com/)``` to be rendered as ```<a href="https://stackoverflow.com/" target="_blank">stackoverflow.com</a>``` instead of ```<a href="https://stackoverflow.com/">stackoverflow.com</a>```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#486