check-code: use fixedmap for replacement of space characters
This can centralize management of fixed replacement into fixedmap.
--- a/contrib/check-code.py Tue May 31 20:58:10 2016 +0900
+++ b/contrib/check-code.py Tue May 31 21:02:30 2016 +0900
@@ -51,13 +51,11 @@
return re.compile(pat)
def repquote(m):
- fixedmap = {'.': 'p', ':': 'q'}
+ fixedmap = {' ': ' ', '\n': '\n', '.': 'p', ':': 'q'}
def encodechr(i):
if i > 255:
return 'u'
c = chr(i)
- if c in ' \n':
- return c
if c in fixedmap:
return fixedmap[c]
if c.isalpha():