Project

General

Profile

« Previous | Next » 

Revision 12748

bugfix: bin/repl: text mode: turned off the suffix matching, because there are cases where a mapping adds a suffix which would cause the same replacement to be performed repeatedly

View differences:

trunk/bin/repl
52 52
                q = quote_re
53 53
                in_ = '(?<='+q+')'+in_str_re+'(?='+q+')' # require quotes
54 54
                if is_word: # also match with quotes optional
55
                    in_word_re = excluded_prefix_re+r'\b'+in_str_re+r'(?=\b|_)'
56
                        # (?=\b|_): also match w/ _* suffix
55
                    # don't try to match word w/ suffix, because there are cases
56
                    # where a mapping adds a suffix which would cause the same
57
                    # replacement to be performed repeatedly
58
                    in_word_re = excluded_prefix_re+r'\b'+in_str_re+r'\b'
57 59
                    in_ = '(?:'+in_+'|'+in_word_re+')'
58 60
            repls.append((r'(?m)'+in_, out))
59 61
    stream.close()

Also available in: Unified diff