contrib/check-code.py
changeset 18959 2f6418d8a4c9
parent 18835 4e7498a586e8
child 18960 170fc0949fb6
equal deleted inserted replaced
18958:c3b920980f22 18959:2f6418d8a4c9
    17     return m.group('quote') + t + m.group('quote')
    17     return m.group('quote') + t + m.group('quote')
    18 
    18 
    19 def reppython(m):
    19 def reppython(m):
    20     comment = m.group('comment')
    20     comment = m.group('comment')
    21     if comment:
    21     if comment:
    22         return "#" * len(comment)
    22         l = len(comment.rstrip())
       
    23         return "#" * l + comment[l:]
    23     return repquote(m)
    24     return repquote(m)
    24 
    25 
    25 def repcomment(m):
    26 def repcomment(m):
    26     return m.group(1) + "#" * len(m.group(2))
    27     return m.group(1) + "#" * len(m.group(2))
    27 
    28