Answer prose round 1: 0 🔴, 7 🟡 (0 misread); the codec pads on a space at both ends too, and the Valid lines name the event that expires them

This commit is contained in:
2026-11-17 03:51:51 +01:00
parent f56962cd8d
commit 2e44ec95ca
3 changed files with 10 additions and 11 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ The spelling, which the decision `todo.md: an item of the next release predicts
A path alone is the whole file, and (small) marks a part the item changes only a little. file_parts says how a part is named.
A path or a name that holds a backtick is spelt as a Markdown code span that holds one: in a longer run of backticks than any it holds, with a space inside each end, as in `` ## The `foo` tool ``. So every path and name on one line has a spelling. A description kept in Jira reaches here through adf_codec, which spells such a name without the spaces where it neither opens nor ends in a backtick, as ``a`b.md``; that is read as the same name."""
A path or a name that holds a backtick is spelt as a Markdown code span that holds one: in a longer run of backticks than any it holds, with a space inside each end, as in `` ## The `foo` tool ``. So every path and name on one line has a spelling. A description kept in Jira reaches here through adf_codec, which pads a span only where its text opens or ends in a backtick, or opens and ends in a space. So it spells a`b.md as ``a`b.md``; code_span reads that as the name too."""
import dataclasses
import re
@@ -84,7 +84,7 @@ def code_span(line: str, at: int) -> tuple[str, int] | None:
if len(run) > 1:
if not text.strip():
return None
# As a Markdown code span reads: a space inside each end keeps a backtick at either end of the text apart from the run, and goes. adf_codec pads only that case, so no space is also the text.
# 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.
if len(text) >= 3 and text.startswith(" ") and text.endswith(" "):
text = text[1:-1]
return (text, opened.end() + closed.end()) if text else None