diff --git a/bin/touch_predictions/prediction.py b/bin/touch_predictions/prediction.py index 9503cb7a..e8577c64 100644 --- a/bin/touch_predictions/prediction.py +++ b/bin/touch_predictions/prediction.py @@ -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