We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents aa73216 + 0571e76 commit cc66ba5Copy full SHA for cc66ba5
stringutilities.py
@@ -15,7 +15,9 @@
15
import json
16
import pprint
17
18
-
+if sys.hexversion >= 0x3000000:
19
+ def unichr(c):
20
+ return chr(c)
21
22
23
class ConvertTabsToSpacesCommand(sublime_plugin.TextCommand):
@@ -92,7 +94,7 @@ def run(self, edit):
92
94
if not region.empty():
93
95
text = ''
96
for c in self.view.substr(region):
- if not re.match(pattern, c) and (c < 0x20 or c > 0x7e):
97
+ if not re.match(pattern, c) and (ord(c) < 0x20 or ord(c) > 0x7e):
98
text += '\\u{0:04X}'.format(ord(c))
99
else:
100
text += c
0 commit comments