Add <figcaption> elements to your images
Project description
# Image Captions and Python and Markdown, together!
Your images have `<figcaption>` elements attached.
[](https://travis-ci.org/bcaller/markdown_figure_caption)
[](https://badge.fury.io/py/markdown_figure_caption)
Very similar to [figureAltCaption](https://github.com/jdittrich/figureAltCaption). This version doesn' handle references or attributes, but does handle links inside the caption.
Behaviour is best displayed via the tests:
```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>'
```
Your images have `<figcaption>` elements attached.
[](https://travis-ci.org/bcaller/markdown_figure_caption)
[](https://badge.fury.io/py/markdown_figure_caption)
Very similar to [figureAltCaption](https://github.com/jdittrich/figureAltCaption). This version doesn' handle references or attributes, but does handle links inside the caption.
Behaviour is best displayed via the tests:
```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>'
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file markdown-figure-caption-0.0.1.tar.gz.
File metadata
- Download URL: markdown-figure-caption-0.0.1.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.8.1 pkginfo/1.4.1 requests/2.9.1 setuptools/20.7.0 requests-toolbelt/0.7.0 clint/0.5.1 CPython/2.7.12 Linux/4.4.6-3-surface
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eac5662c54571061b5620664c79d9f963152bd8ab83ce33c4a3e74361954df06
|
|
| MD5 |
50de29cfd4a9e0effbb8394b36680707
|
|
| BLAKE2b-256 |
be5e0f5d56b75421092dff10d6e92d611583fd0a6c45c6d2804e7a71edfb7633
|
File details
Details for the file markdown_figure_caption-0.0.1-py3-none-any.whl.
File metadata
- Download URL: markdown_figure_caption-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.8.1 pkginfo/1.4.1 requests/2.9.1 setuptools/20.7.0 requests-toolbelt/0.7.0 clint/0.5.1 CPython/2.7.12 Linux/4.4.6-3-surface
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62295e96015fb6288f9bfcdea5fbe5b5134189dfd11a918f25490bc51b99dffe
|
|
| MD5 |
2e49e326a34e0705228d4f46ac712d91
|
|
| BLAKE2b-256 |
1789c2e9bcce4e5bb56fbe9fa5ff5abc65f4c96c951042b81ef628c90a39e850
|