Show More
@@ -940,9 +940,7 b' def show_changeset(ui, repo, opts, buffe' | |||||
940 |
|
940 | |||
941 | tmpl = opts.get('template') |
|
941 | tmpl = opts.get('template') | |
942 | style = None |
|
942 | style = None | |
943 | if tmpl: |
|
943 | if not tmpl: | |
944 | tmpl = templater.parsestring(tmpl, quoted=False) |
|
|||
945 | else: |
|
|||
946 | style = opts.get('style') |
|
944 | style = opts.get('style') | |
947 |
|
945 | |||
948 | # ui settings |
|
946 | # ui settings |
@@ -52,7 +52,7 b' def tokenizer(data):' | |||||
52 | if not decode: |
|
52 | if not decode: | |
53 | yield ('string', program[s:pos].replace('\\', r'\\'), s) |
|
53 | yield ('string', program[s:pos].replace('\\', r'\\'), s) | |
54 | break |
|
54 | break | |
55 |
yield ('string', program[s:pos] |
|
55 | yield ('string', program[s:pos], s) | |
56 | break |
|
56 | break | |
57 | pos += 1 |
|
57 | pos += 1 | |
58 | else: |
|
58 | else: | |
@@ -80,19 +80,19 b' def compiletemplate(tmpl, context):' | |||||
80 | parsed = [] |
|
80 | parsed = [] | |
81 | pos, stop = 0, len(tmpl) |
|
81 | pos, stop = 0, len(tmpl) | |
82 | p = parser.parser(tokenizer, elements) |
|
82 | p = parser.parser(tokenizer, elements) | |
83 |
|
||||
84 | while pos < stop: |
|
83 | while pos < stop: | |
85 | n = tmpl.find('{', pos) |
|
84 | n = tmpl.find('{', pos) | |
86 | if n < 0: |
|
85 | if n < 0: | |
87 | parsed.append(("string", tmpl[pos:])) |
|
86 | parsed.append(("string", tmpl[pos:].decode("string-escape"))) | |
88 | break |
|
87 | break | |
89 | if n > 0 and tmpl[n - 1] == '\\': |
|
88 | if n > 0 and tmpl[n - 1] == '\\': | |
90 | # escaped |
|
89 | # escaped | |
91 |
parsed.append(("string", |
|
90 | parsed.append(("string", | |
|
91 | (tmpl[pos:n - 1] + "{").decode("string-escape"))) | |||
92 | pos = n + 1 |
|
92 | pos = n + 1 | |
93 | continue |
|
93 | continue | |
94 | if n > pos: |
|
94 | if n > pos: | |
95 | parsed.append(("string", tmpl[pos:n])) |
|
95 | parsed.append(("string", tmpl[pos:n].decode("string-escape"))) | |
96 |
|
96 | |||
97 | pd = [tmpl, n + 1, stop] |
|
97 | pd = [tmpl, n + 1, stop] | |
98 | parseres, pos = p.parse(pd) |
|
98 | parseres, pos = p.parse(pd) |
@@ -80,8 +80,8 b'' | |||||
80 | return m ? m[1] : null; |
|
80 | return m ? m[1] : null; | |
81 | }, |
|
81 | }, | |
82 | '.bigtable > tbody:nth-of-type(2)', |
|
82 | '.bigtable > tbody:nth-of-type(2)', | |
83 | '<tr class="%class%">\ |
|
83 | '<tr class="%class%">\\ | |
84 | <td colspan="3" style="text-align: center;">%text%</td>\ |
|
84 | <td colspan="3" style="text-align: center;">%text%</td>\\ | |
85 | </tr>' |
|
85 | </tr>' | |
86 | ); |
|
86 | ); | |
87 | </script> |
|
87 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now