def handleMatch()

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


    def handleMatch(self, m):
        node = markdown.util.etree.Element(self.tag)
        tag_attributes = self.config.get(m.group('prefix'), ('', 'pelican-inline'))
        tag_class = 'pelican-inline'  # default class
        tag_style = ''  # default is for no styling

        if isinstance(tag_attributes, tuple):
            tag_style = tag_attributes[0]
            tag_class = tag_attributes[1] if len(tag_attributes) > 1 else ''
        elif isinstance(tag_attributes, str):
            tag_class = tag_attributes

        if tag_class != '':
            node.set('class', tag_class)
        if tag_style!= '':
            node.set('style', tag_style)

        node.text = markdown.util.AtomicString(m.group('text'))

        return node