Skip to content

Commit

Permalink
Merge pull request #520 from spencermountain/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
spencermountain authored Mar 12, 2023
2 parents 799da0f + 29e9cb2 commit 72df976
Show file tree
Hide file tree
Showing 16 changed files with 344 additions and 195 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node-version: [12.x, 16.x, 18.x]
node-version: [16.x, 18.x]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions builds/wtf_wikipedia-client.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions builds/wtf_wikipedia-client.mjs

Large diffs are not rendered by default.

23 changes: 16 additions & 7 deletions builds/wtf_wikipedia.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! wtf_wikipedia 10.1.2 MIT */
/*! wtf_wikipedia 10.1.3 MIT */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('isomorphic-unfetch')) :
typeof define === 'function' && define.amd ? define(['isomorphic-unfetch'], factory) :
Expand Down Expand Up @@ -3435,7 +3435,7 @@

//every value in {{tmpl|a|b|c}} needs a name
//here we come up with names for them
const hasKey = /^[\p{Letter}0-9._\- '()\t]+=/iu;
const hasKey = /^[\p{Letter}0-9._/\- '()\t]+=/iu;

//templates with these properties are asking for trouble
const reserved = {
Expand Down Expand Up @@ -4398,7 +4398,12 @@
'scax',
'wmata',
'rwsa',
]
],
// 'br separated entries': [
// 'br list',
// 'br-separated entries',
// 'br separated entries',
// ]
};

// - other languages -
Expand Down Expand Up @@ -7423,6 +7428,7 @@
return h
}
h[str.toLowerCase()] = i;
h[str.substring(0, 3).toLowerCase()] = i;
return h
}, {});

Expand All @@ -7439,10 +7445,13 @@
let num = parseInt(arr[i], 10);
if (isNaN(num) === false) {
obj[units[i]] = num; //we good.
} else if (units[i] === 'month' && monthName.hasOwnProperty(arr[i])) {
} else if (units[i] === 'month') {
let m = arr[i].toLowerCase().trim();
//try for month-name, like 'january
let month = monthName[arr[i]];
obj[units[i]] = month;
if (monthName.hasOwnProperty(m)) {
let month = monthName[m];
obj[units[i]] = month;
}
} else {
//we dead. so skip this unit
delete obj[units[i]];
Expand Down Expand Up @@ -10412,7 +10421,7 @@
})
};

var version = '10.1.2';
var version = '10.1.3';

/**
* use the native client-side fetch function
Expand Down
23 changes: 16 additions & 7 deletions builds/wtf_wikipedia.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! wtf_wikipedia 10.1.2 MIT */
/*! wtf_wikipedia 10.1.3 MIT */
import unfetch from 'isomorphic-unfetch';

/**
Expand Down Expand Up @@ -3427,7 +3427,7 @@ const pipeSplitter = function (tmpl) {

//every value in {{tmpl|a|b|c}} needs a name
//here we come up with names for them
const hasKey = /^[\p{Letter}0-9._\- '()\t]+=/iu;
const hasKey = /^[\p{Letter}0-9._/\- '()\t]+=/iu;

//templates with these properties are asking for trouble
const reserved = {
Expand Down Expand Up @@ -4390,7 +4390,12 @@ let multi = {
'scax',
'wmata',
'rwsa',
]
],
// 'br separated entries': [
// 'br list',
// 'br-separated entries',
// 'br separated entries',
// ]
};

// - other languages -
Expand Down Expand Up @@ -7415,6 +7420,7 @@ const monthName = months$1.reduce((h, str, i) => {
return h
}
h[str.toLowerCase()] = i;
h[str.substring(0, 3).toLowerCase()] = i;
return h
}, {});

Expand All @@ -7431,10 +7437,13 @@ const ymd = function (arr) {
let num = parseInt(arr[i], 10);
if (isNaN(num) === false) {
obj[units[i]] = num; //we good.
} else if (units[i] === 'month' && monthName.hasOwnProperty(arr[i])) {
} else if (units[i] === 'month') {
let m = arr[i].toLowerCase().trim();
//try for month-name, like 'january
let month = monthName[arr[i]];
obj[units[i]] = month;
if (monthName.hasOwnProperty(m)) {
let month = monthName[m];
obj[units[i]] = month;
}
} else {
//we dead. so skip this unit
delete obj[units[i]];
Expand Down Expand Up @@ -10404,7 +10413,7 @@ const fetch = function (title, options, callback) {
})
};

var version = '10.1.2';
var version = '10.1.3';

/**
* use the native client-side fetch function
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
- **[new]** - fallbackTemplateFn handler #509
-->
#### 10.1.3 [Mar 2023]
- **[fix]** - #519 date parsing issue
- **[fix]** - #518 support slash in infobox property
- **[fix]** - #516 better support {{br}} template

#### 10.1.2 [Jan 2023]
- **[fix]** - #514 runtime error
- **[update]** - dependencies
Expand Down
Loading

0 comments on commit 72df976

Please sign in to comment.