Module:曲师列表:修订间差异
JSON 流水线更新渲染模块 |
JSON 流水线更新渲染模块 |
||
| 第9行: | 第9行: | ||
local DIFFS = { 'CASUAL', 'TOUGH', 'INSANE', 'PRO' } | local DIFFS = { 'CASUAL', 'TOUGH', 'INSANE', 'PRO' } | ||
-- 含分隔符但其实是"单人名义"的写法, 不拆分 (键为 norm() 后的值) | |||
local NO_SPLIT = { | |||
['w/csθ'] = true, -- 单人名, 含斜杠 | |||
['↑=192.333kb/s'] = true, -- 单人名, 含斜杠 | |||
['t+pazolite'] = true, -- 单人名, 含加号 | |||
} | |||
-- ===== 工具 ===== | -- ===== 工具 ===== | ||
| 第88行: | 第95行: | ||
local raw = song['曲师'] | local raw = song['曲师'] | ||
if type(raw) == 'table' then raw = raw[1] end | if type(raw) == 'table' then raw = raw[1] end | ||
local parts = splitRaw(raw) | local parts = NO_SPLIT[norm(raw)] and { { base = raw, ann = '' } } or splitRaw(raw) | ||
local seen = {} | local seen = {} | ||
for _, pt in ipairs(parts) do | for _, pt in ipairs(parts) do | ||
| 第134行: | 第141行: | ||
-- 备注: 合作者 + 括号注释 | -- 备注: 合作者 + 括号注释 | ||
local notes = {} | local notes = {} | ||
local rawS = type(s['曲师']) == 'table' and s['曲师'][1] or s['曲师'] | |||
local allParts = NO_SPLIT[norm(rawS)] and { { base = rawS, ann = '' } } or splitRaw(rawS) | |||
for _, pt in ipairs(allParts) do | |||
if norm(pt.base) ~= key then table.insert(notes, pt.base) end | if norm(pt.base) ~= key then table.insert(notes, pt.base) end | ||
end | end | ||