Module:LDSverse: Difference between revisions

Content deleted Content added
Remove periods in book abbreviations
m Remove completed TODO item and convert assert(false) statements into straight-up error calls
Line 3:
 
-- TODO:
-- Take out the assert/error statements and handle errors more gracefully?
-- Handle situations where the book name parameter is mistakenly left out (e.g., {{LDS|Alma|7|11}}): if the "bookParam" evaluates to a number, shift all the parameters "down" one (i.e., bookParam->chapterParam, chapterParam->verseParam, etc.) and treat the display text (minus any period or other punctuation) is the bookParam.
 
--[[
Line 200 ⟶ 199:
-- At this point we've searched, without regard to case, creed, or color,
-- for the alleged book of scripture they provided, but it ain't here!
asserterror(false, "Book <" .. bookParam .. "> not found in Standard Works", 0)
return ""
end --function getFullBookName(bookParam)
Line 222 ⟶ 221:
end
asserterror(false, "Book <" .. book .. "> is not a full book name found in Standard Works", 0)
end
 
Line 275 ⟶ 274:
return "[https://www.churchofjesuschrist.org/study/scriptures/dc-testament/od/2?lang=eng " .. displayTextParam .. " 2]"
else
asserterror(false, "No such Official Declaration: " .. chapter, 0)
end
end
Line 347 ⟶ 346:
end
asserterror(false, "Lecture on Faith number <" .. lectureNum .. "> does not exist (should be between 1 and 7)", 0)
end