Skip to content
Snippets Groups Projects
Commit 8b900b93 authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

templater: respect stop position while parsing template string

It has no effect now because stop is len(tmpl).
parent cd842821
No related branches found
No related tags found
No related merge requests found
......@@ -132,5 +132,5 @@
pos, stop = 0, len(tmpl)
p = parser.parser(elements)
while pos < stop:
n = tmpl.find('{', pos)
n = tmpl.find('{', pos, stop)
if n < 0:
......@@ -136,5 +136,6 @@
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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment