mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-05-26 07:57:29 +09:00
Fix bug
This commit is contained in:
parent
e0ced1dce9
commit
c981350893
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "summaly",
|
"name": "summaly",
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"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",
|
||||||
|
@ -75,7 +75,12 @@ export default async (url: URL.Url): Promise<any> => {
|
|||||||
|
|
||||||
icon = icon ? URL.resolve(url.href, icon) : null;
|
icon = icon ? URL.resolve(url.href, icon) : null;
|
||||||
|
|
||||||
title = title.replace(new RegExp(`\s?[\-\|:]?\s?${escapeRegExp(siteName)}$`), '').trim();
|
title = title.replace(new RegExp(`${escapeRegExp(siteName)}$`), '').trim();
|
||||||
|
title = title.replace(/[\-\|:]$/, '').trim();
|
||||||
|
|
||||||
|
if (title == '') {
|
||||||
|
title = siteName;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: title,
|
title: title,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user