def handleAttributes(text, parent):
    def attributeCallback(match):
        parent.set(match.group(1), match.group(2).replace('\n', ' '))
    return ATTR_RE.sub(attributeCallback, text)
Set values of an element based on attribute definitions ({@id=123}).
dataset/ETHPy150Open joeyb/joeyb-blog/externals/markdown/inlinepatterns.py/handleAttributes