Modulo:Versione stampabile: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
mNessun oggetto della modifica
Nessun oggetto della modifica
Riga 95:
chapter = mw.ustring.gsub(chapter, "%[%[/", "[[" .. BookName .. "/")
chapter = mw.ustring.gsub(chapter, "%/%]%]", "]]")
chapter = mw.ustring.gsub(chapter, "%/$", "")
if mw.ustring.find(chapter, "%[%[") ~= nil then
-- Pages titles extraction from the TOC
if mw.ustring.find(chapter, "%|") == nil or (mw.ustring.find(chapter, "%]") ~= nil and mw.ustring.find(chapter, "%|") > mw.ustring.find(chapter, "%]")) then
Ending = "%]"
else
if mw.ustring.find(chapter, "%/%|") == nil or mw.ustring.find(chapter, "%/%|") > mw.ustring.find(chapter, "%|") then
Ending = "%|"
else
Ending = "%/%|"
end
end
chapter = mw.ustringtext.gsubsplit(chapter, "[^%[]*%[%[([^%"..Ending.."]*).*", "%[1")] -- bracketsextraction of andthe pipesline removalbeginning
chapter = mw.ustring.gsub(chapter, "[^%[]*%[%[(.*)", "%1") -- brackets and pipes removal
 
if chapter == BookName or chapter == BookName .. sep or mw.ustring.find(chapter, "%#") ~= nil then
if debug then chapter = '<font color=red>Chapter = ' .. chapter .. ' => book name or another subpage name</font> with Ending = ' .. Ending else chapter = '' end
else
if OnlySubpages then