|
From: Ian G. J. <ia...@ho...> - 2013-11-01 18:22:03
|
Hey folks,
I want to disable all of markdown by default and only enable certain
features, whitelist style. Here's what I've got so far (trying to enable
links only):
class MyMarkdownExtension(markdown.Extension):
def extendMarkdown(self, md, md_globals):
for i in md.inlinePatterns.keys():
if i != 'link':
del md.inlinePatterns[i]
The next step is to do the work to disable the other parts of
python-markdown besides inlinePatters, but before I do that I wanted to
ask if I'm on the right track, or if there's a better way to do this.
Thanks!
Ian
|