##// END OF EJS Templates
Removed image tag from markdown. Refactored markdown extension code. This fixes #21
neko259 -
r100:f41ee93d default
parent child Browse files
Show More
@@ -63,6 +63,16 b' class NeboardMarkdown(markdown.Extension'
63 COMMENT_PATTERN = r'^(//(.+))'
63 COMMENT_PATTERN = r'^(//(.+))'
64
64
65 def extendMarkdown(self, md, md_globals):
65 def extendMarkdown(self, md, md_globals):
66 self._add_neboard_patterns(md)
67 self._delete_patterns(md)
68
69 def _delete_patterns(self, md):
70 del md.parser.blockprocessors['quote']
71
72 del md.inlinePatterns['image_link']
73 del md.inlinePatterns['image_reference']
74
75 def _add_neboard_patterns(self, md):
66 autolink = AutolinkPattern(self.AUTOLINK_PATTERN, md)
76 autolink = AutolinkPattern(self.AUTOLINK_PATTERN, md)
67 quote = QuotePattern(self.QUOTE_PATTERN, md)
77 quote = QuotePattern(self.QUOTE_PATTERN, md)
68 reflink = ReflinkPattern(self.REFLINK_PATTERN, md)
78 reflink = ReflinkPattern(self.REFLINK_PATTERN, md)
@@ -75,8 +85,6 b' class NeboardMarkdown(markdown.Extension'
75 md.inlinePatterns[u'reflink'] = reflink
85 md.inlinePatterns[u'reflink'] = reflink
76 md.inlinePatterns[u'quote'] = quote
86 md.inlinePatterns[u'quote'] = quote
77
87
78 del md.parser.blockprocessors['quote']
79
80
88
81 def makeExtension(configs=None):
89 def makeExtension(configs=None):
82 return NeboardMarkdown(configs=configs)
90 return NeboardMarkdown(configs=configs)
General Comments 0
You need to be logged in to leave comments. Login now