Skip to content

Commit

Permalink
close: wrap new delete template w/ noinclude
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishzx committed Oct 24, 2024
1 parent 7958348 commit 207b70f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/twinkleclose.js
Original file line number Diff line number Diff line change
Expand Up @@ -826,8 +826,10 @@ Twinkle.close.callbacks = {
Morebits.status.warn(conv({ hans: '重新标记', hant: '重新標記' }), conv({ hans: '找不到提删模板,重新插入', hant: '找不到提刪模板,重新插入' }));
// Insert tag after short description or any hatnotes
var wikipage = new Morebits.wikitext.page(text);
// TODO: can we add reason here?
var tag = '{{vfd|date=' + params.date + '}}\n';
if (pageobj.getPageName().substring(0, 9) === 'Template:') {
tag = '<noinclude>' + tag + '</noinclude>';
}
text = wikipage.insertAfterTemplates(tag, Twinkle.hatnoteRegex).getText();
}

Expand Down

0 comments on commit 207b70f

Please sign in to comment.