使用 target="_blank" 在带有 github 降价的新标签页中打开链接 [英] open link in new tab with github markdown using target="_blank"

查看:20
本文介绍了使用 target="_blank" 在带有 github 降价的新标签页中打开链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让用 githubs markdown 编写的链接在新标签页中打开?我发现的所有与此相关的帖子都建议使用 HTML 和 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>

不会在新标签页中打开.我对各种不同的降价语法的回复不感兴趣,但只对我在 github 上写降价时有效的解决方案感兴趣.

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.

推荐答案

好吧,似乎简单的答案是这是不可能的".即使您使用纯 HTML,Github 也不包含 target 属性,因此它不在最终的 HTML Anchor 标记中.烦人,但好吧,用户只需在链接上按 CTRL+单击(在 Windows 和 Linux 上)或 CMD+单击(在 MacOS 上),就会得到相同的行为.

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 Windows and Linux) or CMD+click (on MacOS) on the link, the get the same behavior.

这篇关于使用 target="_blank" 在带有 github 降价的新标签页中打开链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆