mediawiki-projects-list 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -172,7 +172,7 @@ function urlToIdString(url) {
172
172
  let project = getWikiProject(url.hostname);
173
173
  if ( !project ) project = getFrontendProxy(url.hostname);
174
174
  if ( project?.idString ) {
175
- let regex = url.href.match( new RegExp( project.regex ) )?.slice(2);
175
+ let regex = url.href.match( new RegExp( project.regex ) )?.slice(2).filter( part => part );
176
176
  if ( regex?.length ) {
177
177
  if ( project.idString.direction === 'desc' ) regex.reverse();
178
178
  result = regex.join(project.idString.separator);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediawiki-projects-list",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "type": "commonjs",
5
5
  "description": "List of MediaWiki projects for use in discord-wiki-bot",
6
6
  "main": "index.js",
package/projects.json CHANGED
@@ -1836,6 +1836,13 @@
1836
1836
  "scriptPath": "/w/",
1837
1837
  "fullScriptPath": "https://wiki.ポケモン.com/w/"
1838
1838
  },
1839
+ {
1840
+ "name": "wikiapiary.com",
1841
+ "regex": "((?:www\\.)?wikiapiary\\.com",
1842
+ "articlePath": "/wiki/",
1843
+ "scriptPath": "/w/",
1844
+ "fullScriptPath": "https://wikiapiary.com/w/"
1845
+ },
1839
1846
  {
1840
1847
  "name": "wikibooks.org",
1841
1848
  "regex": "((?:([a-z\\d-]{1,50})\\.)?(?:m\\.)?wikibooks\\.org)",