This commit is contained in:
syuilo 2018-06-10 03:55:51 +09:00
parent 50b37a8420
commit 8bcf44bc16

View file

@ -24,9 +24,11 @@ const handlers = {
}, },
hashtag({ document }, { hashtag }) { hashtag({ document }, { hashtag }) {
const span = document.createElement('span'); const a = document.createElement('a');
span.textContent = '#' + hashtag; a.href = config.url + '/search?q=#' + hashtag;
document.body.appendChild(span); a.textContent = '#' + hashtag;
a.setAttribute('rel', 'tag');
document.body.appendChild(a);
}, },
'inline-code'({ document }, { code }) { 'inline-code'({ document }, { code }) {