mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-05-25 23:47:28 +09:00
Fix bug
This commit is contained in:
parent
e0ced1dce9
commit
c981350893
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "summaly",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"description": "Get web page's summary",
|
||||
"author": "syuilo <i@syuilo.com>",
|
||||
"license": "MIT",
|
||||
|
@ -75,7 +75,12 @@ export default async (url: URL.Url): Promise<any> => {
|
||||
|
||||
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 {
|
||||
title: title,
|
||||
|
Loading…
x
Reference in New Issue
Block a user