Skip to content

Instantly share code, notes, and snippets.

View Triavanicus's full-sized avatar

Colton Ward Triavanicus

  • 03:52 (UTC -05:00)
View GitHub Profile
@Triavanicus
Triavanicus / gfm.py
Last active July 14, 2019 06:42 — forked from gasman/gfm.py
import re
from hashlib import md5
from markdown import markdown
def gfm(value):
# Extract pre blocks.
extractions = {}
def pre_extraction_callback(matchobj):
digest = md5(matchobj.group(0).encode('utf-8')).hexdigest()
extractions[digest] = matchobj.group(0)