Module:ListGeneration: Difference between revisions
// via Wikitext Extension for VSCode |
// via Wikitext Extension for VSCode Tag: Reverted |
||
| Line 28: | Line 28: | ||
-- Dependencies | -- Dependencies | ||
local NormalizationText = require('Module:NormalizationText') | local NormalizationText = require('Module:NormalizationText') | ||
local ConfigRepository | |||
-- Core list creation function | -- Core list creation function | ||
| Line 78: | Line 79: | ||
end | end | ||
-- Handle | -- Handle wikitext bullet list | ||
if mode == 'bullet' or mode == 'bullet_custom' or mode == 'invisible' then | if mode == 'bullet' then | ||
ConfigRepository = ConfigRepository or require('Module:ConfigRepository') | |||
local bulletChar = ConfigRepository.p.default_bullet or '*' | |||
local listItems = {} | |||
for _, itemData in ipairs(items) do | |||
local content = type(itemData) == 'table' and itemData.content or itemData | |||
if content and content ~= '' then | |||
table.insert(listItems, bulletChar .. ' ' .. content) | |||
end | |||
end | |||
return table.concat(listItems, '\n') | |||
end | |||
-- Handle HTML list-based modes | |||
if mode == 'bullet_custom' or mode == 'invisible' then | |||
local listItems = {} | local listItems = {} | ||
local listStyle = '' | local listStyle = '' | ||