summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-06-10 03:55:51 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-06-10 03:55:51 +0900
commit8bcf44bc16866741eed2af5f8757ee13816779fa (patch)
treee826846f4a0d953c957257ebc11f096458629311 /src
parentoops (diff)
downloadsharkey-8bcf44bc16866741eed2af5f8757ee13816779fa.tar.gz
sharkey-8bcf44bc16866741eed2af5f8757ee13816779fa.tar.bz2
sharkey-8bcf44bc16866741eed2af5f8757ee13816779fa.zip
:v:
Diffstat (limited to 'src')
-rw-r--r--src/text/html.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/text/html.ts b/src/text/html.ts
index 58038bc31b..53d4e8a52d 100644
--- a/src/text/html.ts
+++ b/src/text/html.ts
@@ -24,9 +24,11 @@ const handlers = {
},
hashtag({ document }, { hashtag }) {
- const span = document.createElement('span');
- span.textContent = '#' + hashtag;
- document.body.appendChild(span);
+ const a = document.createElement('a');
+ a.href = config.url + '/search?q=#' + hashtag;
+ a.textContent = '#' + hashtag;
+ a.setAttribute('rel', 'tag');
+ document.body.appendChild(a);
},
'inline-code'({ document }, { code }) {