# HG changeset patch # User Christian Ebert # Date 1191507168 -7200 # Node ID 474eccf2964fb2364f47ef1d4b5444bc15471846 # Parent 22e08d0f25dcbd49f0ca3cb47963257171c8ccaa Map re.escape diff -r 22e08d0f25dc -r 474eccf2964f hgkw/keyword.py --- a/hgkw/keyword.py Thu Oct 04 15:01:16 2007 +0200 +++ b/hgkw/keyword.py Thu Oct 04 16:12:48 2007 +0200 @@ -172,7 +172,7 @@ kwmaps = [(k, templater.parsestring(v, quoted=False)) for (k, v) in kwmaps] self.templates = dict(kwmaps) - escaped = [re.escape(k) for k in self.templates.keys()] + escaped = map(re.escape, self.templates.keys()) kwpat = r'\$(%s)(: [^$\n\r]*? )??\$' % '|'.join(escaped) self.re_kw = re.compile(kwpat) if self.t: