Read a Touches list from a Jira description, as the codec spells it, and reword four decisions' expiry and two reading-cost goal citations
CI / tests (pull_request) Failing after 3m8s
CI / tests (pull_request) Failing after 3m8s
This commit is contained in:
@@ -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 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."""
|
||||
import dataclasses
|
||||
import re
|
||||
|
||||
@@ -82,10 +82,11 @@ def code_span(line: str, at: int) -> tuple[str, int] | None:
|
||||
return None
|
||||
text = line[opened.end():opened.end() + closed.start()]
|
||||
if len(run) > 1:
|
||||
# A longer run holds a space inside each end, which keeps a backtick at either end of the text apart from the run.
|
||||
if len(text) < 3 or not text.startswith(" ") or not text.endswith(" "):
|
||||
if not text.strip():
|
||||
return None
|
||||
text = text[1:-1]
|
||||
# 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.
|
||||
if len(text) >= 3 and text.startswith(" ") and text.endswith(" "):
|
||||
text = text[1:-1]
|
||||
return (text, opened.end() + closed.end()) if text else None
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user