Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. import mistune
  2.  
  3. def main(meta, content, level):
  4. """A Bootstrap-style alert.
  5. """
  6. # We want to be able to write our body content in Markdown,
  7. # so we use the `mistune` library to convert it to HTML.
  8. html = mistune.markdown(content)
  9. return '<div class="alert alert-{0}" role="alert">{1}</div>'.format(level, html)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement