zk/tech/md-ext/verse.md

31 lines
631 B
Markdown
Raw Normal View History

2020-04-22 06:40:03 +00:00
%title Verse Markdown Extension
:tech:markdown:vimwiki:python:package:
## What it does
I write a lot of poetry, but don't want to use code blocks for it, preferring instead to use a `div` with `white-space: pre-wrap` style. I use a triple single-quote fence.
'''
This
is
a
poem
'''
## How to use it
```python
default_config = {
'tag_tuple': ('<div class="verse">', '</div>'),
}
my_config = {
'tag_tuple': ('<verse>', '</verse>'),
}
markdown(source, extensions=[VerseExtension(**my_config)])
```
## Where to get it
* [PyPI](https://pypi.com/project/markdown-verse)
* [Github](https://github.com/makyo/markdown-verse)