home
·
contact
·
privacy
projects
/
ircplom
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7dd32d6
)
Fix tests crashing on empty lines in anchored regions.
author
Christian Heller
<c.heller@plomlompom.de>
Thu, 2 Oct 2025 20:58:32 +0000
(22:58 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Thu, 2 Oct 2025 20:58:32 +0000
(22:58 +0200)
src/ircplom/testing.py
patch
|
blob
|
history
diff --git
a/src/ircplom/testing.py
b/src/ircplom/testing.py
index c8bfdd6cc2de48b06e1d9cd2db012127155827fb..fca3765b176a6437ec90e6a12b87c7ccc6468eba 100644
(file)
--- a/
src/ircplom/testing.py
+++ b/
src/ircplom/testing.py
@@
-144,9
+144,9
@@
class _Playbook:
if len(range_data) == 2:
return inserts
for jdx, insert in enumerate(inserts):
- context, msg = self._split_by_context_separator(insert)
- if context == _CHAR_ANCHOR:
+ if (not insert) or insert.startswith(_CHAR_ANCHOR):
continue
+ context, msg = self._split_by_context_separator(insert)
inserts[jdx] = _CHAR_CONTEXT_SEP.join([range_data[2]] + [msg])
return inserts