Skip to content

Commit

Permalink
chore(macros): delete {{Interwiki}} macro (#9264)
Browse files Browse the repository at this point in the history
* chore(macros): delete {{Interwiki}} macro

* chore: remove reference to removed macros
  • Loading branch information
yin1999 authored Jul 17, 2023
1 parent df09d78 commit 74431cf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 43 deletions.
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

0 comments on commit 74431cf

Please sign in to comment.