zk/tech/md-ext/verse.md

631 B

%title Verse Markdown Extension :tech:markdown:vimwiki:python📦

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

default_config = {
    'tag_tuple': ('<div class="verse">', '</div>'),
}
my_config = {
    'tag_tuple': ('<verse>', '</verse>'),
}
markdown(source, extensions=[VerseExtension(**my_config)])

Where to get it