Module:LDSverse: Difference between revisions

Content deleted Content added
m added a todo item in the intro comments
added function to get a (wikitable-ified) list of all the book name aliases for use in template documentation
Line 432:
wikiText = wikiText .. "]]" -- DON'T FORGET!!!
return wikiText
end
 
-- returns a (collapsed by default) wikitable listing all the aliases for every book
-- designed for use on the {{LDS}} template documentation page
function p.getBookAliasesWikiTable()
local wikiTable = [[{| class="wikitable sortable mw-collapsible mw-collapsed"
|+ class="nowrap" |LDS Template Book Name Aliases
! Standard Work !! Book !! Aliases
]]
for sw, bookList in pairs(standardWorks) do
wikiTable = wikiTable .. '|-\n|rowspan="' .. countKeys(bookList) .. '"|' .. sw .. "\n"
for book, aliases in pairs(bookList) do
wikiTable = wikiTable .. "| " .. book .. "\n| " .. table.concat(aliases, ", ") .. "\n|-\n"
end
end
wikiTable = wikiTable .. "|}"
return wikiTable
end