Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import mistune
- def main(meta, content, level):
- """A Bootstrap-style alert.
- """
- # We want to be able to write our body content in Markdown,
- # so we use the `mistune` library to convert it to HTML.
- html = mistune.markdown(content)
- return '<div class="alert alert-{0}" role="alert">{1}</div>'.format(level, html)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement