This commit is contained in:
@@ -72,9 +72,8 @@ def after_string(source: bytes, position: int) -> int | None:
|
||||
|
||||
def after_raw_string(source: bytes, position: int, hashes: bytes) -> int | None:
|
||||
"""The offset after the raw string, opened by `r`, hashes and a quote, that ends at position, None where it is never closed. It has no escapes."""
|
||||
closing = b'"' + hashes
|
||||
found = source.find(closing, position)
|
||||
return found + len(closing) if found >= 0 else None
|
||||
closed = re.compile(b'"' + hashes).search(source, position)
|
||||
return closed.end() if closed else None
|
||||
|
||||
|
||||
def with_tests_of(planted: bytes, copy: bytes) -> bytes:
|
||||
|
||||
Reference in New Issue
Block a user