Last active
February 18, 2019 00:02
-
-
Save jdkato/918296518c80611068baf021697337b5 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, classes=[]): | |
| """Adding classes to a `<p>`. | |
| """ | |
| html = mistune.markdown(content) | |
| return html.replace("<p>", '<p class="{0}">'.format(" ".join(classes))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment