def extendMarkdown()

in plugins/md_inline_extension/pelican_inline_markdown_extension.py [0:0]


    def extendMarkdown(self, md, md_globals):
        # Regex to detect mathjax
        config = self.getConfig('config')
        patterns = []

        # The following mathjax settings can be set via the settings dictionary
        for key in config:
            patterns.append(re.escape(key))

        inline_regex = r'(?P<prefix>%s)(?P<text>.+?)\2' % ('|'.join(patterns))

        # Process after escapes
        md.inlinePatterns.add('texthighlight_inlined', PelicanInlineMarkdownExtensionPattern(self, 'span', inline_regex), '>emphasis2')