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 details)
File details
Details for the file markdown-figure-0.0.1.tar.gz
.
File metadata
- Download URL: markdown-figure-0.0.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ccbb4897a304639bed9438a056a5a79c074c49772af7f4431343d4efb72650d |
|
MD5 | a803282c29036bea68dce0cbd07792be |
|
BLAKE2b-256 | 8a5cf767114a1fb1fc883ddcc41dcabf25b34c9a83b339570952959c8e6efc1b |