Answer stability round 1: 0 🔴, 0 🟡 (0 misread); a comment records that a name opening and ending in a space isn't read back from Jira

This commit is contained in:
2026-11-17 04:27:12 +01:00
parent a87b9a4d16
commit 8a6c5102df
+1 -1
View File
@@ -81,7 +81,7 @@ def code_span(line: str, at: int) -> tuple[str, int] | None:
if opened is None or closed is None:
return None
text = line[opened.end():opened.end() + closed.start()]
# In a longer run, a space at both ends is padding, which keeps a backtick at either end of the text apart from the run. Without one at both ends, the span is its text.
# In a longer run, a space at both ends is padding, which keeps a backtick at either end of the text apart from the run. Without one at both ends, the span is its text. A one-backtick span is always its text, so a name that opens and ends in a space isn't read back from Jira, whose codec pads it; no path or heading is spelt so.
if len(run) > 1 and text.startswith(" ") and text.endswith(" "):
text = text[1:-1]
return (text, opened.end() + closed.end()) if text else None