githubhyperlinkmarkup

open link in new tab with github markdown using target="_blank"


Is there a way to let a Link, written in githubs markdown, open in a new tab? All posts I have found related to this suggests to use HTML and target="_blank", which is fine with me, but that doesn't work. For example this link:

<a href="http://stackoverflow.com" target="_blank">Go</a>

Does not open in a new tab. I'm no interested in replies for all kind of different markdown syntaxes, but only in a solution that will work when I write my markdown on github.


Solution

  • Well, it seems that the simple answer is "It's not possible". GitHub does not include the target attribute even if you use plain HTML, so it's not in the final HTML Anchor tag. Annoying, but OK, users can just do a CTRL+click (on Windows and Linux) or CMD+click (on MacOS) on the link to get the same behavior.