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)')
```
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
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
markdown-figure-0.0.1.tar.gz
(3.2 kB
view hashes)