style fixes
This commit is contained in:
@@ -31,9 +31,9 @@ class MyTestCase(unittest.TestCase):
|
|||||||
self.assertEqual(9, line.column_to_char(15)) # tab
|
self.assertEqual(9, line.column_to_char(15)) # tab
|
||||||
self.assertEqual(10, line.column_to_char(16)) # g
|
self.assertEqual(10, line.column_to_char(16)) # g
|
||||||
|
|
||||||
def test_column_to_char_ignore_nonspacing_mark_charaters(self):
|
def test_column_to_char_ignore_nonspacing_mark_characters(self):
|
||||||
"""
|
"""
|
||||||
nonspacing mark charaters are those little decorations that are applied to the previous character,
|
nonspacing mark characters are those little decorations that are applied to the previous character,
|
||||||
e.g. x\u0308 to make ẍ
|
e.g. x\u0308 to make ẍ
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
@@ -63,7 +63,7 @@ class MyTestCase(unittest.TestCase):
|
|||||||
|
|
||||||
def test_char_to_column_ignore_nonspacing_mark_charaters(self):
|
def test_char_to_column_ignore_nonspacing_mark_charaters(self):
|
||||||
"""
|
"""
|
||||||
nonspacing mark charaters are those little decorations that are applied to the previous character,
|
nonspacing mark characters are those little decorations that are applied to the previous character,
|
||||||
e.g. x\u0308 to make ẍ
|
e.g. x\u0308 to make ẍ
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
@@ -119,7 +119,7 @@ class MyTestCase(unittest.TestCase):
|
|||||||
for i in range(128):
|
for i in range(128):
|
||||||
if unicodedata.category(chr(i)) == "Cc":
|
if unicodedata.category(chr(i)) == "Cc":
|
||||||
# print(i, " -> ", ord(chr(i)), " --> ", chr(9216 + i))
|
# print(i, " -> ", ord(chr(i)), " --> ", chr(9216 + i))
|
||||||
if not i in [9, 10, 11, 13]:
|
if i not in [9, 10, 11, 13]:
|
||||||
text = text + chr(i)
|
text = text + chr(i)
|
||||||
|
|
||||||
line = Line(byte_offset=byte_offset, byte_end=byte_offset + len(text.encode("utf8")), line=text)
|
line = Line(byte_offset=byte_offset, byte_end=byte_offset + len(text.encode("utf8")), line=text)
|
||||||
|
|||||||
Reference in New Issue
Block a user