将<figcaption>元素添加到图像中
markdown-figure-caption的Python项目详细描述
#图片标题和Python和标记,一起!
您的图像附加了`<;figcaption>;`元素。
[![特拉维斯](https://travis ci.org/bcaller/markdown_figure_caption.svg)(https://travis ci.org/bcaller/markdown_figure_caption)
[![PYPI版本](https://badge.fury.io/py/markdown_figure廑caption.svg)](https://badge.fury.io/py/markdown廑figure廑caption)
非常类似于[图形选项](https://github.com/jditrich/figuletcaption)。此版本不处理引用或属性,但处理标题内的链接。
behavior最好通过测试显示:
``python
def test\u image\u simple(标记):
s=![标题](http://example.com/x.png)“
converted=markdown.convert
assert converted==”<;p>;<;figure>;<;img alt=“标题”src=“http://example.com/x.png”/>;<;figcaption>;标题<;/figcaption>;<;/figure>;<;/p>;'
def test image\u link in(标记):
s=”![标题来自[来源](http://example.com/x.png)”
converted=markdown.convert
assert converted==='<;p>;<;figure>;<;img alt=“标题来自来源”src=“http://example.com/x.png”/>;<;figcaption>;<;a href=“http://example.com”>;source<;/a>;<;/figcaption>;<;/数字>;<;/p>;'
```
您的图像附加了`<;figcaption>;`元素。
[![特拉维斯](https://travis ci.org/bcaller/markdown_figure_caption.svg)(https://travis ci.org/bcaller/markdown_figure_caption)
[![PYPI版本](https://badge.fury.io/py/markdown_figure廑caption.svg)](https://badge.fury.io/py/markdown廑figure廑caption)
非常类似于[图形选项](https://github.com/jditrich/figuletcaption)。此版本不处理引用或属性,但处理标题内的链接。
behavior最好通过测试显示:
``python
def test\u image\u simple(标记):
s=![标题](http://example.com/x.png)“
converted=markdown.convert
assert converted==”<;p>;<;figure>;<;img alt=“标题”src=“http://example.com/x.png”/>;<;figcaption>;标题<;/figcaption>;<;/figure>;<;/p>;'
def test image\u link in(标记):
s=”![标题来自[来源](http://example.com/x.png)”
converted=markdown.convert
assert converted==='<;p>;<;figure>;<;img alt=“标题来自来源”src=“http://example.com/x.png”/>;<;figcaption>;<;a href=“http://example.com”>;source<;/a>;<;/figcaption>;<;/数字>;<;/p>;'
```