Module:ItemData/nav: Difference between revisionsGive feedback
Active Items table: plain wikilinks for inline attributes, var(--color-base) for off-white styling, em dash for missing stats, add Duration and Cast Range columns (with help from vergir-bot LLM) |
Active Items table: use var(--color-subtle) for diminished notes (with help from vergir-bot LLM) |
||
| Line 237: | Line 237: | ||
local RANGE_PROPERTIES = { "AbilityCastRange", "Radius", "EndRadius" } | local RANGE_PROPERTIES = { "AbilityCastRange", "Radius", "EndRadius" } | ||
-- | -- Rewrites the description markup [[Module:Lang]] produces | ||
local function | local function restyle_description(text) | ||
text = text:gsub(INLINE_ATTRIBUTE_PATTERN, '[[%1|%2]]') | text = text:gsub(INLINE_ATTRIBUTE_PATTERN, '[[%1|%2]]') | ||
-- Attributes with an icon but no link keep their span; follow the site text color | -- Attributes with an icon but no link keep their span; follow the site text color | ||
text = text:gsub('color:#ffefd7;', 'color:var(--color-base);') | |||
-- Diminished notes ("Cannot be used while Stunned...") | |||
return (text:gsub('color:#C0C0C0', 'color:var(--color-subtle)')) | |||
end | end | ||
| Line 349: | Line 351: | ||
table.insert(rows, "\n|}") | table.insert(rows, "\n|}") | ||
return | return restyle_description(frame:preprocess(table.concat(rows, "\n"))) | ||
end | end | ||
return p | return p | ||