可验证报告的核对页:正文里的判定语被改过时,原因写「正文显示「…」,分析结论里的判定语是「…」」。判定语的引用不带值(判定语就是结论里的那句话),原来照数字的写法拼成「引用的值是空值(NULL)」,读起来像引用本身是空的;具名的数、结果表的格照旧写引用的值和按显示规则应显示的字

This commit is contained in:
ThearchyHelios
2026-10-21 19:09:20 +08:00
parent 29874166df
commit 019676670b
+5
View File
@@ -198,6 +198,8 @@
/** cited 已经加好引号(空值写「空值(NULL)」);expected 和引用的值写法一样时不写(文字取值) */ /** cited 已经加好引号(空值写「空值(NULL)」);expected 和引用的值写法一样时不写(文字取值) */
numShownDiffers: (shown, cited, expected) => `正文显示「${shown}」,引用的值是${cited}` numShownDiffers: (shown, cited, expected) => `正文显示「${shown}」,引用的值是${cited}`
+ (expected == null ? '' : `,按显示规则应显示为「${expected}」`), + (expected == null ? '' : `,按显示规则应显示为「${expected}」`),
/** 判定语的引用不带值(判定语就是结论里的那句话):只点名正文显示的字和结论里的判定语,不写「引用的值是空值」 */
numPhraseDiffers: (shown, expected) => `正文显示「${shown}」,分析结论里的判定语是「${expected}」`,
numShownUnknown: (why) => `无法核对显示文字:${why}`, numShownUnknown: (why) => `无法核对显示文字:${why}`,
shownFormat: (fmt) => `显示格式「${fmt}」无法识别`, shownFormat: (fmt) => `显示格式「${fmt}」无法识别`,
shownConv: (conv) => `换算「${conv}」无法识别`, shownConv: (conv) => `换算「${conv}」无法识别`,
@@ -1619,6 +1621,9 @@
info.expected = expected info.expected = expected
const shown = String(seg.text ?? '') const shown = String(seg.text ?? '')
if (pyStrip(shown) === pyStrip(expected)) return { ...info, result: PASS, shownOk: true } if (pyStrip(shown) === pyStrip(expected)) return { ...info, result: PASS, shownOk: true }
if (info.cite.kind === 'analysis' && !Object.prototype.hasOwnProperty.call(info.cite, 'value')) {
return { ...info, result: FAIL, reason: T.numPhraseDiffers(shown, expected) }
}
const value = info.cite.value const value = info.cite.value
const cited = typeof value === 'number' ? numberText(value, info.citedToken) : value == null ? null : textOf(value) const cited = typeof value === 'number' ? numberText(value, info.citedToken) : value == null ? null : textOf(value)
return { ...info, result: FAIL, reason: T.numShownDiffers(shown, cited == null ? T.nullValue : `「${cited}」`, return { ...info, result: FAIL, reason: T.numShownDiffers(shown, cited == null ? T.nullValue : `「${cited}」`,