Skip to content

Instantly share code, notes, and snippets.

@kezabelle
Created June 1, 2016 13:07
Show Gist options
  • Save kezabelle/e947bfa0511f311ecd70661fdc273f8a to your computer and use it in GitHub Desktop.
Save kezabelle/e947bfa0511f311ecd70661fdc273f8a to your computer and use it in GitHub Desktop.
gimme
import re
import markdown2
z = re.compile('\<(?P<lol>h[1-6])\>(.+?)\<\/(?P=lol)\>')
x = """
#### lol
## lol
<h1>lol</h1>
\n```
<h2>heh</h2>
```
"""
y = markdown2.markdown(x, extras=['fenced-code-blocks', 'metadata', 'footnotes'])
z.findall(y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment