Improve inteligence

This commit is contained in:
syuilo 2016-09-15 12:13:48 +09:00
parent b988f05d71
commit 4c76fefe53
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "summaly", "name": "summaly",
"version": "1.2.2", "version": "1.2.3",
"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

@ -78,7 +78,7 @@ export default async (url: URL.Url): Promise<ISummary> => {
icon = icon ? URL.resolve(url.href, icon) : null; icon = icon ? URL.resolve(url.href, icon) : null;
title = title.replace(new RegExp(`${escapeRegExp(siteName)}$`), '').trim(); title = title.replace(new RegExp(`${escapeRegExp(siteName)}$`), '').trim();
title = title.replace(/[\-\|:]$/, '').trim(); title = title.replace(/[\-\|:]$/, '').trim();
if (title == '') { if (title == '') {
title = siteName; title = siteName;