diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-06-10 03:55:51 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-06-10 03:55:51 +0900 |
| commit | 8bcf44bc16866741eed2af5f8757ee13816779fa (patch) | |
| tree | e826846f4a0d953c957257ebc11f096458629311 /src | |
| parent | oops (diff) | |
| download | sharkey-8bcf44bc16866741eed2af5f8757ee13816779fa.tar.gz sharkey-8bcf44bc16866741eed2af5f8757ee13816779fa.tar.bz2 sharkey-8bcf44bc16866741eed2af5f8757ee13816779fa.zip | |
:v:
Diffstat (limited to 'src')
| -rw-r--r-- | src/text/html.ts | 8 |
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 }) { |