3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-12 11:48:29 +01:00

Answer stability round 1: 0 🔴, 1 🟡 (0 misread); write a hostile fence whose info string holds a backtick with tildes

This commit is contained in:
2026-11-09 00:36:20 +01:00
committed by Lillem4n
parent 6b33a2e299
commit 673121ac8a
+2 -1
View File
@@ -197,7 +197,8 @@ const hostileBlockCarry = fc
.map(([[type, untyped], named, body, spelling, other]) => {
const value = body === 'untyped' ? untyped : body === 'typed' ? { ...untyped, type } : other
const json = spelling === 'canonical' ? serializeCanonicalJson(value, 'two-space') : spelling === 'compact' ? JSON.stringify(value) : JSON.stringify(value, null, 1)
return fencedCodeBlock(`${carryFencePrefix}${named ?? type}`, json)
const info = `${carryFencePrefix}${named ?? type}`
return info.includes('`') ? `~~~${info}\n${json}\n~~~` : fencedCodeBlock(info, json)
})
function prefixLines(body: string, first: string, rest: (index: number) => string): string {