Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(macros): delete {{Interwiki}} macro #9264

Merged
merged 2 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions kumascript/macros/Interwiki.ejs

This file was deleted.

13 changes: 1 addition & 12 deletions kumascript/src/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,16 @@ const MACROS_IN_SUMMARY_TO_IGNORE = new Set([
"apiref",
"jsref",
"compat",
"index",
"page",
"obsolete_header",
"deprecated_header",
"previous",
"previousmenu",
"previousnext",
"previousmenunext",
"wiki.localize",
"quicklinkswithsubpages",
]);

const MACROS_IN_SUMMARY_TO_REPLACE_WITH_FIRST_ARGUMENT = new Set([
"draft",
"glossary",
"anch",
]);
const MACROS_IN_SUMMARY_TO_REPLACE_WITH_FIRST_ARGUMENT = new Set(["glossary"]);

function repairURL(url) {
// Returns a lowercase URI with common irregularities repaired.
Expand Down Expand Up @@ -324,10 +317,6 @@ function postProcessSummaryHTMLSnippet(text, document) {

if (MACROS_IN_SUMMARY_TO_REPLACE_WITH_FIRST_ARGUMENT.has(macroName)) {
output += token.args[0];
} else if (macroName === "interwiki") {
// Include the last one. E.g.
// {{Interwiki("wikipedia","Flynn%27s_taxonomy","classification of computer")}}
output += token.args[token.args.length - 1];
} else {
output += `<code>${token.args[0]}</code>`;
}
Expand Down