mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-05-20 04:57:25 +09:00
Fix bug
This commit is contained in:
parent
884004828f
commit
e0ced1dce9
@ -30,7 +30,7 @@ const summary = await summaly('http://elephant.2chblog.jp/archives/52025138.html
|
|||||||
console.log(summary); // will be ... ↓
|
console.log(summary); // will be ... ↓
|
||||||
/*
|
/*
|
||||||
{
|
{
|
||||||
title: 'モバP「ありすと言えばお漏らし。お漏らしと言えばありす」 : エレファント速報:SSまとめブログ',
|
title: 'モバP「ありすと言えばお漏らし。お漏らしと言えばありす」',
|
||||||
icon: 'http://livedoor.blogimg.jp/tmg24news/imgs/9/5/favicon.ico',
|
icon: 'http://livedoor.blogimg.jp/tmg24news/imgs/9/5/favicon.ico',
|
||||||
description: '1:以下、名無しにかわりましてVIPがお送りします:2013/03/30(土) 14:57:29.09 ID:An34eOmY0モバP「反論が あるやつもいるかもしれない」 モバP「だが俺の主張も聞いてほしい! お漏らしさせるならありすが一番だ!」 日菜子「むふふ……いきなりそんなことを大声で',
|
description: '1:以下、名無しにかわりましてVIPがお送りします:2013/03/30(土) 14:57:29.09 ID:An34eOmY0モバP「反論が あるやつもいるかもしれない」 モバP「だが俺の主張も聞いてほしい! お漏らしさせるならありすが一番だ!」 日菜子「むふふ……いきなりそんなことを大声で',
|
||||||
thumbnail: 'http://livedoor.blogimg.jp/tmg24news/imgs/8/d/8df6e1a0-s.jpg',
|
thumbnail: 'http://livedoor.blogimg.jp/tmg24news/imgs/8/d/8df6e1a0-s.jpg',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "summaly",
|
"name": "summaly",
|
||||||
"version": "1.1.0",
|
"version": "1.1.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",
|
||||||
|
@ -75,7 +75,7 @@ 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(`[\-\|:]?${escapeRegExp(siteName)}$`));
|
title = title.replace(new RegExp(`\s?[\-\|:]?\s?${escapeRegExp(siteName)}$`), '').trim();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: title,
|
title: title,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user