Submitter | Yuya Nishihara |
---|---|
Date | July 12, 2015, 2:54 p.m. |
Message ID | <0bdccc00e5aaba80b379.1436712896@mimosa> |
Download | mbox | patch |
Permalink | /patch/9953/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -132,9 +132,10 @@ def compiletemplate(tmpl, context): pos, stop = 0, len(tmpl) p = parser.parser(elements) while pos < stop: - n = tmpl.find('{', pos) + n = tmpl.find('{', pos, stop) if n < 0: - parsed.append(('string', tmpl[pos:])) + parsed.append(('string', tmpl[pos:stop])) + pos = stop break bs = (n - pos) - len(tmpl[pos:n].rstrip('\\')) if bs % 2 == 1: