def _check_and_return_text()

in lib/pygments/mentos.py [0:0]


    def _check_and_return_text(self, text, start_id, end_id):

        # Sanity check.
        id_regex = re.compile('[A-Z]{8}')

        if not id_regex.match(start_id) and not id_regex.match(end_id):
            _write_error("ID check failed. Not an ID.")

        if not start_id == end_id:
            _write_error("ID check failed. ID's did not match.")

        # Passed the sanity check. Remove the id's and return
        text = text[10:-10]
        return text