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

Contenu supprimé Contenu ajouté
MEP pour autoriser les + et - dans les titres
Autorisation des + dans Programmation C++
Ligne 38 :
BookName = frame.args[2]
else
if mw.ustring.find(BookName, p._escapePattern(sep .. TOC), 1, true) ~= nil then BookName = mw.ustring.gsub(BookName, "^(.*)" .. sep .. TOC .. "$", "%1") end
end
if frame.args[3] ~= nil then OnlySubpages = false end
Ligne 132 :
if OnlySubpages then
-- Book subpages only (and ignoring the other links like "see also")
if mw.ustring.find(chapter, p._escapePattern(BookName .. sep)), == nil and mw.ustring.find(p._replaceSpecialCharacters(chapter)1, p._replaceSpecialCharacters(BookName .. sep)true) == nil then
if debug then chapter = "<font color=red>No book subpage into the internal link:</font> '" .. chapter .. "' doesn't include '" .. BookName .. sep .. "'" else chapter = '' end
end
Ligne 169 :
if (BookName ~= nil and mw.text.trim(BookName) ~= "") then
title = mw.title.new(BookName)
if mw.ustring.find(BookName, p._escapePattern(sep .. TOC), 1, true) ~= nil then BookName = mw.ustring.gsub(BookName, "^(.*)" .. sep .. TOC .. "$", "%1") end
else
return Error
Ligne 212 :
end
if fullPageName ~= nil then
if mw.ustring.find(fullPageName, p._escapePattern(BookName .. sep)), == nil and mw.ustring.find(p._replaceSpecialCharacters(fullPageName)1, p._replaceSpecialCharacters(BookName .. sep)true) == nil then
if debug then table.insert(footer, " replacement of " .. fullPageName .. " by " .. BookName .. sep .. fullPageName .. "\n") end
fullPageName = BookName .. sep .. fullPageName