equal
deleted
inserted
replaced
28 _ignore = [unichr(int(x, 16)).encode("utf-8") for x in |
28 _ignore = [unichr(int(x, 16)).encode("utf-8") for x in |
29 "200c 200d 200e 200f 202a 202b 202c 202d 202e " |
29 "200c 200d 200e 200f 202a 202b 202c 202d 202e " |
30 "206a 206b 206c 206d 206e 206f feff".split()] |
30 "206a 206b 206c 206d 206e 206f feff".split()] |
31 # verify the next function will work |
31 # verify the next function will work |
32 if pycompat.ispy3: |
32 if pycompat.ispy3: |
33 assert set(i[0] for i in _ignore) == set([ord(b'\xe2'), ord(b'\xef')]) |
33 assert set(i[0] for i in _ignore) == {ord(b'\xe2'), ord(b'\xef')} |
34 else: |
34 else: |
35 assert set(i[0] for i in _ignore) == set(["\xe2", "\xef"]) |
35 assert set(i[0] for i in _ignore) == {"\xe2", "\xef"} |
36 |
36 |
37 def hfsignoreclean(s): |
37 def hfsignoreclean(s): |
38 """Remove codepoints ignored by HFS+ from s. |
38 """Remove codepoints ignored by HFS+ from s. |
39 |
39 |
40 >>> hfsignoreclean(u'.h\u200cg'.encode('utf-8')) |
40 >>> hfsignoreclean(u'.h\u200cg'.encode('utf-8')) |