We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4de50c7 commit fcde7d1Copy full SHA for fcde7d1
pdr/parselabel/utils.py
@@ -4,7 +4,7 @@
4
5
6
KNOWN_LABEL_ENDINGS = (
7
- re.compile(b"\nEND {0,2}(\r| {8})"), # common PVL convention
+ re.compile(b"\nEND {0,8}(\r| {8})"), # common PVL convention
8
re.compile(b"\x00{3}"), # just null bytes, for odder cases
9
)
10
"""
@@ -29,7 +29,7 @@ def _scan_to_end_of_label(
29
if (chunk := buf.read(50 * 1024)) == b'':
30
break
31
for ending in KNOWN_LABEL_ENDINGS:
32
- if (endmatch := re.search(ending, text[:-15] + chunk)) is not None:
+ if (endmatch := re.search(ending, chunk)) is not None:
33
return text + chunk[: endmatch.span()[1]]
34
text, length = text + chunk, length + 50 * 1024
35
if raise_no_ending is True:
0 commit comments