Skip to content

Commit 015abc2

Browse files
10.4.0rc2
1 parent ec5d8f5 commit 015abc2

File tree

3 files changed

+18
-103
lines changed

3 files changed

+18
-103
lines changed

.eslintrc

Lines changed: 0 additions & 87 deletions
This file was deleted.

builds/wtf_wikipedia.cjs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @returns {{domain: string, title: string}} The domain and title of a url
1414
*/
1515
const parseUrl = function (url) {
16-
let parsed = new URL(url); // eslint-disable-line
16+
let parsed = new URL(url); //eslint-disable-line
1717
let title = parsed.pathname.replace(/^\/(wiki\/)?/, '');
1818
title = decodeURIComponent(title);
1919
return {
@@ -1208,20 +1208,17 @@
12081208
let name = t.template || '';
12091209
// try i18n templates like 'stubo'
12101210
if (allStubs.has(name)) {
1211-
// console.log(name)
12121211
return true
12131212
}
12141213
// english forms
12151214
if (name === 'stub' || name.endsWith('-stub')) {
1216-
// console.log(name)
12171215
return true
12181216
}
12191217
// look for i18n in last-word, like {{foo-stubo}}
12201218
let words = name.split(/[- ]/);
12211219
if (words.length > 1) {
12221220
let word = words[words.length - 1];
12231221
if (allStubs.has(word)) {
1224-
// console.log(name)
12251222
return true
12261223
}
12271224
}
@@ -2157,7 +2154,6 @@
21572154
}
21582155
//kill off just these just-anchor links [[#history]]
21592156
// if (link.match(/^#/i)) {
2160-
// console.log(s)
21612157
// return s
21622158
// }
21632159
//remove anchors from end [[toronto#history]]
@@ -9303,6 +9299,8 @@
93039299
sports,
93049300
);
93059301

9302+
/* eslint-disable no-console */
9303+
93069304
let templates = Object.assign({}, textTmpl, dataTmpl, bothTmpl);
93079305

93089306
Object.keys(aliases).forEach((k) => {
@@ -9312,8 +9310,6 @@
93129310
templates[k] = templates[aliases[k]];
93139311
});
93149312

9315-
// console.log(Object.keys(templates).length)
9316-
93179313
const nums = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
93189314

93199315
//this gets all the {{template}} objects and decides how to parse them
@@ -10575,7 +10571,7 @@
1057510571
};
1057610572
});
1057710573

10578-
const heading_reg = /^(={1,6})(.{1,200}?)={1,6}$/;
10574+
const heading_reg = /^(={1,6})(.{1,200}?)={1,6}$/; //eslint-disable-line
1057910575
const hasTemplate = /\{\{.+?\}\}/;
1058010576

1058110577
const doInlineTemplates = function (wiki, doc) {
@@ -10723,6 +10719,8 @@
1072310719
return [categories, newWiki]
1072410720
};
1072510721

10722+
/* eslint-disable no-console */
10723+
1072610724
const defaults$1 = {
1072710725
tables: true,
1072810726
lists: true,
@@ -11361,6 +11359,7 @@
1136111359
}
1136211360
};
1136311361

11362+
/* eslint-disable no-console */
1136411363
const isUrl = /^https?:\/\//;
1136511364

1136611365
/**
@@ -11444,6 +11443,8 @@
1144411443

1144511444
var version = '10.4.0';
1144611445

11446+
/* eslint-disable no-console */
11447+
1144711448
/**
1144811449
* use the native client-side fetch function
1144911450
*

builds/wtf_wikipedia.mjs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import unfetch from 'isomorphic-unfetch';
99
* @returns {{domain: string, title: string}} The domain and title of a url
1010
*/
1111
const parseUrl = function (url) {
12-
let parsed = new URL(url); // eslint-disable-line
12+
let parsed = new URL(url); //eslint-disable-line
1313
let title = parsed.pathname.replace(/^\/(wiki\/)?/, '');
1414
title = decodeURIComponent(title);
1515
return {
@@ -1204,20 +1204,17 @@ const isStub = function (doc) {
12041204
let name = t.template || '';
12051205
// try i18n templates like 'stubo'
12061206
if (allStubs.has(name)) {
1207-
// console.log(name)
12081207
return true
12091208
}
12101209
// english forms
12111210
if (name === 'stub' || name.endsWith('-stub')) {
1212-
// console.log(name)
12131211
return true
12141212
}
12151213
// look for i18n in last-word, like {{foo-stubo}}
12161214
let words = name.split(/[- ]/);
12171215
if (words.length > 1) {
12181216
let word = words[words.length - 1];
12191217
if (allStubs.has(word)) {
1220-
// console.log(name)
12211218
return true
12221219
}
12231220
}
@@ -2153,7 +2150,6 @@ const internal_links = function (links, str) {
21532150
}
21542151
//kill off just these just-anchor links [[#history]]
21552152
// if (link.match(/^#/i)) {
2156-
// console.log(s)
21572153
// return s
21582154
// }
21592155
//remove anchors from end [[toronto#history]]
@@ -9299,6 +9295,8 @@ var bothTmpl = Object.assign(
92999295
sports,
93009296
);
93019297

9298+
/* eslint-disable no-console */
9299+
93029300
let templates = Object.assign({}, textTmpl, dataTmpl, bothTmpl);
93039301

93049302
Object.keys(aliases).forEach((k) => {
@@ -9308,8 +9306,6 @@ Object.keys(aliases).forEach((k) => {
93089306
templates[k] = templates[aliases[k]];
93099307
});
93109308

9311-
// console.log(Object.keys(templates).length)
9312-
93139309
const nums = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
93149310

93159311
//this gets all the {{template}} objects and decides how to parse them
@@ -10571,7 +10567,7 @@ Object.keys(singular$1).forEach((k) => {
1057110567
};
1057210568
});
1057310569

10574-
const heading_reg = /^(={1,6})(.{1,200}?)={1,6}$/;
10570+
const heading_reg = /^(={1,6})(.{1,200}?)={1,6}$/; //eslint-disable-line
1057510571
const hasTemplate = /\{\{.+?\}\}/;
1057610572

1057710573
const doInlineTemplates = function (wiki, doc) {
@@ -10719,6 +10715,8 @@ const parse_categories = function (wiki) {
1071910715
return [categories, newWiki]
1072010716
};
1072110717

10718+
/* eslint-disable no-console */
10719+
1072210720
const defaults$1 = {
1072310721
tables: true,
1072410722
lists: true,
@@ -11357,6 +11355,7 @@ const makeHeaders = function (options) {
1135711355
}
1135811356
};
1135911357

11358+
/* eslint-disable no-console */
1136011359
const isUrl = /^https?:\/\//;
1136111360

1136211361
/**
@@ -11440,6 +11439,8 @@ const fetch = function (title, options, callback) {
1144011439

1144111440
var version = '10.4.0';
1144211441

11442+
/* eslint-disable no-console */
11443+
1144311444
/**
1144411445
* use the native client-side fetch function
1144511446
*

0 commit comments

Comments
 (0)