From e47ebf9632d2dd4e4fcd8a298775333ff7d52b40 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 10 Jun 2018 03:55:51 +0900 Subject: [PATCH] :v: --- src/text/html.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/text/html.ts b/src/text/html.ts index 58038bc31..53d4e8a52 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 }) {