##// END OF EJS Templates
check-code: more replacement characters...
Simon Heimberg -
r19999:169cb9e4 stable
parent child Browse files
Show More
@@ -26,8 +26,25 b' def compilere(pat, multiline=False):'
26 26 return re.compile(pat)
27 27
28 28 def repquote(m):
29 t = re.sub(r"\w", "x", m.group('text'))
30 t = re.sub(r"[^\s\nx]", "o", t)
29 fromc = '.:'
30 tochr = 'pq'
31 def encodechr(i):
32 if i > 255:
33 return 'u'
34 c = chr(i)
35 if c in ' \n':
36 return c
37 if c.isalpha():
38 return 'x'
39 if c.isdigit():
40 return 'n'
41 try:
42 return tochr[fromc.find(c)]
43 except (ValueError, IndexError):
44 return 'o'
45 t = m.group('text')
46 tt = ''.join(encodechr(i) for i in xrange(256))
47 t = t.translate(tt)
31 48 return m.group('quote') + t + m.group('quote')
32 49
33 50 def reppython(m):
@@ -263,7 +280,7 b' pypats = ['
263 280 ],
264 281 # warnings
265 282 [
266 (r'(^| )oo +xxxxoo[ \n][^\n]', "add two newlines after '.. note::'"),
283 (r'(^| )pp +xxxxqq[ \n][^\n]', "add two newlines after '.. note::'"),
267 284 ]
268 285 ]
269 286
General Comments 0
You need to be logged in to leave comments. Login now