Skip to main content

Add <figcaption> elements to your images

Project description

# Image Captions and Python and Markdown, together!

Your images have `<figcaption>` elements attached.

[![PyPI version](](

Very similar to [figureAltCaption]( This version doesn' handle references or attributes, but does handle links inside the caption.

Behaviour is best displayed via the tests:

def test_image_simple(markdown):
s = "![The caption]("
converted = markdown.convert(s)
assert converted == '<p><figure><img alt="The caption" src="" /><figcaption>The caption</figcaption></figure></p>'

def test_image_link_in_caption(markdown):
s = "![The caption from [source](]("
converted = markdown.convert(s)
assert converted == '<p><figure><img alt="The caption from source" src="" /><figcaption>The caption from <a href="">source</a></figcaption></figure></p>'


Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for markdown-figure-caption, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size markdown_figure_caption-0.0.1-py3-none-any.whl (4.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size markdown-figure-caption-0.0.1.tar.gz (14.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page