Last active
February 17, 2019 23:45
-
-
Save jdkato/ec92ea4b05286edbc704dc5604b7ed81 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment