Created
November 11, 2015 04:35
-
-
Save yymm/726df7f0e4ed48e54a06 to your computer and use it in GitHub Desktop.
This file contains 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 markdown | |
from markdown import Extension | |
from markdown.postprocessors import Postprocessor | |
import re | |
import requests | |
GIST_RE = r"^http(?:s)?://gist\.github\.com/.+$" | |
class EmbedExtension(Extension): | |
def extendMarkdown(self, md, md_globals): | |
md.postprocessors.add('embed', EmbedPostprocesser(self), '>raw_html') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment