Skip to main content

Markdown extension which turns images into figures

Project description

# markdown-figure

An extension to the [Python Markdown](https://pypi-hypernode.com/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 details)

Uploaded Source

File details

Details for the file markdown-figure-0.0.1.tar.gz.

File metadata

File hashes

Hashes for markdown-figure-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9ccbb4897a304639bed9438a056a5a79c074c49772af7f4431343d4efb72650d
MD5 a803282c29036bea68dce0cbd07792be
BLAKE2b-256 8a5cf767114a1fb1fc883ddcc41dcabf25b34c9a83b339570952959c8e6efc1b

See more details on using hashes here.

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