Fix bug (1.4.1)

This commit is contained in:
syuilo 2017-01-30 09:06:44 +09:00
parent 3d0a5995ff
commit 12463da014
3 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "summaly", "name": "summaly",
"version": "1.4.0", "version": "1.4.1",
"description": "Get web page's summary", "description": "Get web page's summary",
"author": "syuilo <i@syuilo.com>", "author": "syuilo <i@syuilo.com>",
"license": "MIT", "license": "MIT",

View File

@ -10,7 +10,7 @@ exports.test = (url: URL.Url) =>
exports.summary = (url: URL.Url) => new Promise((res, rej) => { exports.summary = (url: URL.Url) => new Promise((res, rej) => {
const lang = url.host.split('.')[0]; const lang = url.host.split('.')[0];
const title = url.pathname.split('/')[2]; const title = url.pathname.split('/')[2];
const endpoint = `https://${lang}.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro=&explaintext=&titles=${title}`; const endpoint = `https://${lang}.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro=&explaintext=&titles=${encodeURIComponent(title)}`;
log(`lang is ${lang}`); log(`lang is ${lang}`);
log(`title is ${title}`); log(`title is ${title}`);

View File

@ -17,7 +17,7 @@
"jsdoc-format": true, "jsdoc-format": true,
"label-position": true, "label-position": true,
"label-undefined": true, "label-undefined": true,
"max-line-length": [true, 140], "max-line-length": false,
"member-access": false, "member-access": false,
"member-ordering": [true, "member-ordering": [true,
"static-before-instance", "static-before-instance",