Skip to main content

Markdown extension which turns images into figures

Project description

# markdown-figure

An extension to the [Python Markdown](https://pypi.python.org/pypi/Markdown) package.

The exension wraps all images in the markdown document or text in `<figure>` tags, inserting a `<figcaption>` as well by re-using the `img alt` tag from markdown syntax (text in square brackets).

To install use `pip install markdown-figure` or use the repository `pip install git+https://github.com/janwh/markdown-figure.git`

Then the extension can be used by doing:
```python

import markdown
from mdfigure import FigureExtension

md = markdown.Markdown(extensions=[FigureExtension()])

# Wrap an Image
md.convert('![my description](image.jpg)')
```

Project details


Download files

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

Source Distribution

markdown-figure-0.0.1.tar.gz (3.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page