问题
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.
回答1:
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 a in the final HTML Anchor tag. Annoying, but OK, users can just do a CTRL+click on the link, the get the same behaviour.
回答2:
The answer should be what @Idavid posted in a comment.
[go](http://stackoverflow.com){:target="_blank"}.
You should also add rel="noopener"
[go](http://stackoverflow.com){:target="_blank" rel="noopener"}
来源:https://stackoverflow.com/questions/41915571/open-link-in-new-tab-with-github-markdown-using-target-blank