mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-05-20 21:17:19 +09:00
Improve inteligence
This commit is contained in:
parent
b988f05d71
commit
4c76fefe53
@ -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",
|
||||||
|
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user