向您的图像添加<figcaption>元素
项目描述
# 图像标题和Python以及Markdown,一起!
您的图像附加了`<figcaption>`元素。
[](https://travis-ci.org/bcaller/markdown_figure_caption)
[](https://badge.fury.io/py/markdown_figure_caption)
与[figureAltCaption](https://github.com/jdittrich/figureAltCaption)非常相似。这个版本不处理引用或属性,但可以处理标题内的链接。
行为最好通过测试来展示
```python
def test_image_simple(markdown)
s = ""
converted = markdown.convert(s)
assert converted == '<p><figure><img alt="The caption" src="http://example.com/x.png" /><figcaption>The caption</figcaption></figure></p>'
def test_image_link_in_caption(markdown)
s = "](http://example.com/x.png)"
converted = markdown.convert(s)
assert converted == '<p><figure><img alt="The caption from source" src="http://example.com/x.png" /><figcaption>The caption from <a href="http://example.com">source</a></figcaption></figure></p>'
```
您的图像附加了`<figcaption>`元素。
[](https://travis-ci.org/bcaller/markdown_figure_caption)
[](https://badge.fury.io/py/markdown_figure_caption)
与[figureAltCaption](https://github.com/jdittrich/figureAltCaption)非常相似。这个版本不处理引用或属性,但可以处理标题内的链接。
行为最好通过测试来展示
```python
def test_image_simple(markdown)
s = ""
converted = markdown.convert(s)
assert converted == '<p><figure><img alt="The caption" src="http://example.com/x.png" /><figcaption>The caption</figcaption></figure></p>'
def test_image_link_in_caption(markdown)
s = "](http://example.com/x.png)"
converted = markdown.convert(s)
assert converted == '<p><figure><img alt="The caption from source" src="http://example.com/x.png" /><figcaption>The caption from <a href="http://example.com">source</a></figcaption></figure></p>'
```
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。
源代码分发
markdown-figure-caption-0.0.1.tar.gz (14.7 kB 查看哈希值)
构建分发
关闭
markdown-figure-caption-0.0.1.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | eac5662c54571061b5620664c79d9f963152bd8ab83ce33c4a3e74361954df06 |
|
MD5 | 50de29cfd4a9e0effbb8394b36680707 |
|
BLAKE2b-256 | be5e0f5d56b75421092dff10d6e92d611583fd0a6c45c6d2804e7a71edfb7633 |
关闭
markdown_figure_caption-0.0.1-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 62295e96015fb6288f9bfcdea5fbe5b5134189dfd11a918f25490bc51b99dffe |
|
MD5 | 2e49e326a34e0705228d4f46ac712d91 |
|
BLAKE2b-256 | 1789c2e9bcce4e5bb56fbe9fa5ff5abc65f4c96c951042b81ef628c90a39e850 |