'Find and remove all Abbreviation references from the text.
Each reference is set as a new AbbrPattern in the markdown instance.'

def run(self, lines):

    new_text = []
    for line in lines:
        m = ABBR_REF_RE.match(line)
        if m:
            abbr = m.group('abbr').strip()
            title = m.group('title').strip()
            self.markdown.inlinePatterns[('abbr-%s' % abbr)] = AbbrPattern(self._generate_pattern(abbr), title)
        else:
            new_text.append(line)
    return new_text
