Show More
@@ -28,17 +28,18 b' from mercurial.hgweb import hgweb_mod' | |||||
28 | from mercurial import templatefilters, extensions |
|
28 | from mercurial import templatefilters, extensions | |
29 | from mercurial.i18n import _ |
|
29 | from mercurial.i18n import _ | |
30 |
|
30 | |||
31 | orig_escape = templatefilters.filters["escape"] |
|
|||
32 |
|
||||
33 | interhg_table = [] |
|
31 | interhg_table = [] | |
34 |
|
32 | |||
35 | def interhg_escape(x): |
|
33 | def uisetup(ui): | |
36 | escstr = orig_escape(x) |
|
34 | orig_escape = templatefilters.filters["escape"] | |
37 | for regexp, format in interhg_table: |
|
|||
38 | escstr = regexp.sub(format, escstr) |
|
|||
39 | return escstr |
|
|||
40 |
|
35 | |||
41 | templatefilters.filters["escape"] = interhg_escape |
|
36 | def interhg_escape(x): | |
|
37 | escstr = orig_escape(x) | |||
|
38 | for regexp, format in interhg_table: | |||
|
39 | escstr = regexp.sub(format, escstr) | |||
|
40 | return escstr | |||
|
41 | ||||
|
42 | templatefilters.filters["escape"] = interhg_escape | |||
42 |
|
43 | |||
43 | def interhg_refresh(orig, self, *args, **kwargs): |
|
44 | def interhg_refresh(orig, self, *args, **kwargs): | |
44 | interhg_table[:] = [] |
|
45 | interhg_table[:] = [] |
General Comments 0
You need to be logged in to leave comments.
Login now