« Module:Maintenance » : différence entre les versions
Contenu supprimé Contenu ajouté
Prise en compte des leçons-chapitres |
Prise en compte des leçons-chapitres |
||
Ligne 218 :
local texte_precede = precede.getContent(precede)
local lesson_chap = mw.ustring.find(texte_precede,"{{Leçon",1,true)
local numero_precedent
if lesson_chap
local numero_precedent = modele(texte_precede,"Chapitre","numéro")▼
if (numero_precedent ~= nil) and (model.args["numéro"] - numero_precedent ~= 1) then --Le chapitre courant ne suit pas le chapitre précédent▼
categorie = categorie.."[[Catégorie:Chapitres avec mauvais enchaînement vers le chapitre précédent]] "▼
if (numero_precedent ~= nil) and (tonumber(numero_precedent) ~= nil) then
▲ else
▲
end
end
end
Ligne 240 ⟶ 243 :
local texte_suit = suit.getContent(suit)
local lesson_chap = mw.ustring.find(texte_suit,"{{Leçon",1,true)
local numero_suivant
if lesson_chap
local numero_suivant = modele(texte_suit,"Chapitre","numéro")▼
else
categorie = categorie.."[[Catégorie:Chapitres avec mauvais enchaînement vers le chapitre suivant]] "▼
if (numero_suivant ~= nil) and (tonumber(numero_suivant) ~= nil) then
▲ else
▲
▲ categorie = categorie.."[[Catégorie:Chapitres avec erreur dans le chapitre suivant]] "
▲
end
else
categorie = categorie.."[[Catégorie:Chapitres avec erreur dans le chapitre suivant]] "
end
end
|