use bytes for find
This commit is contained in:
@@ -105,8 +105,8 @@ def comments_between_tokens(token1, token2):
|
|||||||
pointer = token1.end_mark.pointer
|
pointer = token1.end_mark.pointer
|
||||||
|
|
||||||
comment_before = None
|
comment_before = None
|
||||||
for line in buf.split('\n'):
|
for line in buf.split(b'\n'):
|
||||||
pos = line.find('#')
|
pos = line.find(b'#')
|
||||||
if pos != -1:
|
if pos != -1:
|
||||||
comment = Comment(line_no, column_no + pos,
|
comment = Comment(line_no, column_no + pos,
|
||||||
token1.end_mark.buffer, pointer + pos,
|
token1.end_mark.buffer, pointer + pos,
|
||||||
|
|||||||
Reference in New Issue
Block a user