|
a/Allura/allura/lib/markdown_extensions.py |
|
b/Allura/allura/lib/markdown_extensions.py |
|
... |
|
... |
31 |
def extendMarkdown(self, md, md_globals):
|
31 |
def extendMarkdown(self, md, md_globals):
|
32 |
md.registerExtension(self)
|
32 |
md.registerExtension(self)
|
33 |
self.forge_processor = ForgeProcessor(self._use_wiki, md, macro_context=self._macro_context)
|
33 |
self.forge_processor = ForgeProcessor(self._use_wiki, md, macro_context=self._macro_context)
|
34 |
self.forge_processor.install()
|
34 |
self.forge_processor.install()
|
35 |
md.preprocessors['fenced-code'] = FencedCodeProcessor()
|
35 |
md.preprocessors['fenced-code'] = FencedCodeProcessor()
|
36 |
md.inlinePatterns['autolink_1'] = AutolinkPattern(r'(http(?:s?)://[a-zA-Z0-9./\-_0%?&=+#;~]+)')
|
36 |
md.inlinePatterns['autolink_1'] = AutolinkPattern(r'(http(?:s?)://[a-zA-Z0-9./\-_0%?&=+#;~:]+)')
|
37 |
md.treeprocessors['br'] = LineOrientedTreeProcessor(md)
|
37 |
md.treeprocessors['br'] = LineOrientedTreeProcessor(md)
|
38 |
# Sanitize HTML
|
38 |
# Sanitize HTML
|
39 |
md.postprocessors['sanitize_html'] = HTMLSanitizer()
|
39 |
md.postprocessors['sanitize_html'] = HTMLSanitizer()
|
40 |
# Rewrite all relative links that don't start with . to have a '../' prefix
|
40 |
# Rewrite all relative links that don't start with . to have a '../' prefix
|
41 |
md.postprocessors['rewrite_relative_links'] = RelativeLinkRewriter(
|
41 |
md.postprocessors['rewrite_relative_links'] = RelativeLinkRewriter(
|