Content deleted Content added
DreamRimmer (talk | contribs) fixes |
DreamRimmer (talk | contribs) make it simple, fix pattern |
||
Line 555:
function parseRfCs(wikitext, topicName) {
const rfcs = [];
const
let match;
▲ while ((match = rfcPattern.exec(wikitext)) !== null) {
const
[pageName, anchor] = link.split('#');
▲ [pageName, anchor] = linkText.split('#');
} else {
pageName =
anchor = '';
}
let
if (timestampStr)
if (
}
}
const url = anchor ?
`https://en.wikipedia.org/wiki/${encodeURIComponent(pageName)}#${encodeURIComponent(anchor)}` :
`https://en.wikipedia.org/wiki/${encodeURIComponent(pageName)}`;
Line 613 ⟶ 585:
rfcs.push({
topic: topicName,
title: displayTitle || pageName,
url: url,
daysOld: daysDiff,
timestamp: timestampStr || ""
});
}
return rfcs;
}
|