« Module:Version imprimable » : différence entre les versions

Contenu supprimé Contenu ajouté
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 108 :
end
chapter = mw.text.split(chapter, Ending)[1] -- extraction of the line beginning
--chapter = mw.text.split(chapter, "%[%[")[2]
chapter = mw.ustring.gsub(chapter, "[^%[]*%[%[(.*)", "%1") -- brackets and pipes removal
 
Ligne 114 ⟶ 115 :
else
if OnlySubpages then
-- Escape for find in regex
BookName = mw.ustring.gsub(BookName, "%+", "%+")
BookName = mw.ustring.gsub(BookName, "%-", "%-")
BookName = mw.ustring.gsub(BookName, "%*", "%*")
BookName = mw.ustring.gsub(BookName, "%/", "%/")
BookName = mw.ustring.gsub(BookName, "%%", "%%")
BookName = mw.ustring.gsub(BookName, "%^", "%^")
 
-- Book subpages only (and ignoring the other links like "see also")
if mw.ustring.find(chapter, BookName .. sep) == nil then