是否可以在github降价渲染中禁用图像的自动链接?

时间:2016-11-16 06:40:56

标签: github markdown

当github.com在readme.md中呈现图片时,它会自动将图片链接到a标记。

使用

![][http://example.com/path/image]

<img src="http://example.com/path/image" />

实际呈现的内容将显示为

<a href="https://camo.githubusercontent.com/8a545f12e16ff12fd...." target="_blank"><img src="https://camo.githubusercontent.com/8a545f12e16ff12f..." alt="" data-canonical-src="http://example.com/path/image" style="max-width:100%;"></a>

我理解github image caching(在camo.githubusercontent.com上),这很好,但我不希望a标记包裹我的图像。

我不确定这是否是github风格的自动链接链接或特定图像的一部分。

我可以提供自己的链接(使用我自己的a标记),但我真正想要的是没有链接,没有a标记。

这可能吗?

谢谢!

2 个答案:

答案 0 :(得分:9)

您可以使用指向#的链接包装您不希望拥有外部链接的图片:

[![](http://example.com/path/image)](#)

<a href="#"><img src="http://example.com/path/image" /></a>

图片仍然可以点击,但至少不会打开新页面。

答案 1 :(得分:2)

只需将<type 'dict'> 22467 {u'sell_average': 3001, u'buy_average': 0, u'name': u'Bastion potion(2)', u'overall_average': 3001, u'sp': 180, u'overall_quantity': 2, u'members': True, u'sell_quantity': 2, u'buy_quantity': 0, u'id': 22467} 22464 {u'sell_average': 4014, u'buy_average': 0, u'name': u'Bastion potion(3)', u'overall_average': 4014, u'sp': 270, u'overall_quantity': 612, u'members': True, u'sell_quantity': 612, u'buy_quantity': 0, u'id': 22464} 5745 {u'sell_average': 0, u'buy_average': 0, u'name': u'Dragon bitter(m)', u'overall_average': 0, u'sp': 2, u'overall_quantity': 0, u'members': True, u'sell_quantity': 0, u'buy_quantity': 0, u'id': 5745} ... data['entry']: {u'sell_average': 7843, u'buy_average': 7845, u'name': u'Ranarr potion (unf)', u'overall_average': 7844, u'sp': 25, u'overall_quantity': 23838, u'members': True, u'sell_quantity': 15090, u'buy_quantity': 8748, u'id': 99} name: Traceback (most recent call last): File "C:/Users/Michael/PycharmProjects/osrsGE/osrsGE.py", line 16, in <module> print "name: ", data['name'] KeyError: 'name' Process finished with exit code 1 放在图片的末尾即可。

赞:

[]()

对于多张图片也是如此:

![test](/src/images/1.jpg)[]()

不客气