mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-23 10:27:28 -07:00
Fix bugs
This commit is contained in:
parent
197951c48a
commit
3b3f7363da
1 changed files with 5 additions and 2 deletions
|
@ -44,7 +44,10 @@ export default Vue.component('mk-note-html', {
|
||||||
return;
|
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();
|
ast.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +103,7 @@ export default Vue.component('mk-note-html', {
|
||||||
case 'hashtag':
|
case 'hashtag':
|
||||||
return createElement('a', {
|
return createElement('a', {
|
||||||
attrs: {
|
attrs: {
|
||||||
href: `${url}/search?q=${token.content}`,
|
href: `${url}/tags/${token.content}`,
|
||||||
target: '_blank'
|
target: '_blank'
|
||||||
}
|
}
|
||||||
}, token.content);
|
}, token.content);
|
||||||
|
|
Loading…
Reference in a new issue