3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-20 07:05:44 +01:00

Answer stability round 1: 1 🔴, 3 🟡 (0 misread); start an empty line's walk at its innermost quote, pin two guards, file item 162

This commit is contained in:
2026-10-31 01:18:45 +01:00
committed by Lillem4n
parent 085ad7f508
commit 088494511d
5 changed files with 52 additions and 11 deletions
+20
View File
@@ -31,3 +31,23 @@ test('measures a block text as the text it writes', () => {
propertyRuns(2000),
)
})
test('writes an empty line without reading the started prefixes inside its innermost quote', () => {
const reads = (emptyLines: number): number => {
let count = 0
let body = blockText(`a${'\n'.repeat(emptyLines)}`)
for (let depth = 0; depth < 3; depth += 1) {
body = new Proxy(prefixedText('- ', ' ', body), {
get(target, key, receiver) {
count += 1
return Reflect.get(target, key, receiver)
},
})
}
const text = quotedText(body)
count = 0
writtenText(text)
return count
}
assert.equal(reads(1000), reads(1))
})