diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-06-12 09:10:34 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-06-12 09:10:34 +0900 |
| commit | d6e5dc2167540776c992b96062b5c133e22dec99 (patch) | |
| tree | 0b7e115e49ec36c770bb8a8515b3e1da26d3d01c /src/client/app/common/views/components/note-html.ts | |
| parent | 2.37.6 (diff) | |
| download | misskey-d6e5dc2167540776c992b96062b5c133e22dec99.tar.gz misskey-d6e5dc2167540776c992b96062b5c133e22dec99.tar.bz2 misskey-d6e5dc2167540776c992b96062b5c133e22dec99.zip | |
Fix bugs
Diffstat (limited to 'src/client/app/common/views/components/note-html.ts')
| -rw-r--r-- | src/client/app/common/views/components/note-html.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/app/common/views/components/note-html.ts b/src/client/app/common/views/components/note-html.ts index 2fa13b16e1..8ace375823 100644 --- a/src/client/app/common/views/components/note-html.ts +++ b/src/client/app/common/views/components/note-html.ts @@ -44,7 +44,10 @@ export default Vue.component('mk-note-html', { return; } - while (ast[ast.length - 1].type == 'hashtag') { + while ( + ast[ast.length - 1].type == 'hashtag' || + (ast[ast.length - 1].type == 'text' && ast[ast.length - 1].content == ' ') || + (ast[ast.length - 1].type == 'text' && ast[ast.length - 1].content == '\n')) { ast.pop(); } @@ -100,7 +103,7 @@ export default Vue.component('mk-note-html', { case 'hashtag': return createElement('a', { attrs: { - href: `${url}/search?q=${token.content}`, + href: `${url}/tags/${token.content}`, target: '_blank' } }, token.content); |