mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-12 11:48:29 +01:00
Pin runEdge's moves give-up with a hand-worked line, and drop item 176
This commit is contained in:
@@ -75,6 +75,12 @@ const lines: { carry?: string[]; drop?: string[]; name: string; nodes: AdfNode[]
|
||||
name: 'a word, strong over nodes 1 and 2, em on node 2, a word after',
|
||||
nodes: [plain('b'), marked(['strong'], '(a'), marked(['strong', 'em'], ')'), plain('c')],
|
||||
},
|
||||
{
|
||||
carry: ['em@2-2'],
|
||||
drop: ['em@2-2'],
|
||||
name: 'a digit, strong and strike over nodes 1 and 2, em on node 2, strong on a digit',
|
||||
nodes: [plain('0'), marked(['strong', 'strike'], '_'), marked(['strong', 'em', 'strike'], '_'), marked(['strong'], '0')],
|
||||
},
|
||||
]
|
||||
|
||||
for (const { carry, drop, name, nodes } of lines) {
|
||||
|
||||
@@ -166,6 +166,7 @@ function mayFlank(sweep: PairSweep, judged: number, character: string, end: 'clo
|
||||
function runEdge(sweep: PairSweep, judged: number, from: number, step: -1 | 1, character: string): string[] | undefined {
|
||||
const found: string[] = []
|
||||
const { delimiters } = touching(sweep, from, step)
|
||||
// Each pair beside adds the characters it may be written with; one that stands ends the run unless it may be written with `character`.
|
||||
for (const at of delimiters) {
|
||||
const other = sweep.pairAt[at] ?? -1
|
||||
const standing = pairStanding(sweep, judged, other)
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
| ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| 153 | 0.4.0 | | question | **Decide whether `src/markdown/` root may import `emit/`, `parse/` or `portable/`, and hold the answer in `.oxlintrc.json` and §The source parts by ADF and format.** | 1 | 2 | 2 | 3 | 2 | code health by 3 | 26.2 |
|
||||
| 176 | 0.4.0 | | | **Delete `runEdge`'s `standing === 'moves'` give-up, and any code only it needs, once a test or an argument shows `runEdge` never reaches it, or else pin the case with a hand-worked line.** | 1 | 1 | 2 | 2 | 2 | code health by 2 | 17.4 |
|
||||
| 45 | 0.4.0 | | defect | **Replace `isAdfDocument` with a reader returning `Result<AdfDocument>`.** | 2 | 1 | 3 | 4 | 3 | 1 by 2 | 13.1 |
|
||||
| 127 | 0.4.0 | | principle | **Hold what `entity-references.test.ts`, `json-text.test.ts` and `result.test.ts` check by asserting outcomes, so none reads source text.** | 2 | 2 | 1 | 3 | 3 | code health by 2 | 13.1 |
|
||||
| 159 | 0.4.0 | | | **Delete `taskBlocks`'s branch that writes the task marker as its own paragraph, once a test shows no block task item reaches it.** | 1 | 1 | 1 | 1 | 1 | code health by 1 | 10.5 |
|
||||
@@ -71,13 +70,6 @@ a paragraph opening with a spellable `!adf:link` (§Nothing recurses unbounded).
|
||||
`src/markdown/**` bans only `html/`; banning `emit/`, `parse/` and `portable/` for the root's own
|
||||
files, with its `ci.sh` probe, extends the decision.
|
||||
|
||||
### 176. Delete `runEdge`'s `standing === 'moves'` give-up, and any code only it needs, once a test or an argument shows `runEdge` never reaches it, or else pin the case with a hand-worked line.
|
||||
|
||||
In `src/markdown/emit/unspellable-runs.ts`, Stryker's mutants of `runEdge`'s
|
||||
`if (standing === 'moves') return undefined` survive the hand-worked tests, and 50,000 fuzz runs
|
||||
comparing the code with the mutant found no output differ. Found on PR 145, 2026-11-09. The
|
||||
comprehension seats found `runEdge` hard to read (`larv-review places`); make it easier.
|
||||
|
||||
### 45. Replace `isAdfDocument` with a reader returning `Result<AdfDocument>`.
|
||||
|
||||
Lands with item 77: the reader returns item 77's copy. Goal 1 has every call return a result; the
|
||||
|
||||
Reference in New Issue
Block a user