Use string interpolation

This commit is contained in:
Aya Morisawa
2018-09-01 23:12:51 +09:00
parent ffb345ccb5
commit 291beb45fc
40 changed files with 53 additions and 53 deletions

View File

@@ -45,7 +45,7 @@ export default function(html: string): string {
if (part.length == 2) {
//#region ホスト名部分が省略されているので復元する
const acct = txt + '@' + (new URL(href.value)).hostname;
const acct = `${txt}@${(new URL(href.value)).hostname}`;
text += acct;
break;
//#endregion

View File

@@ -44,8 +44,8 @@ const handlers: { [key: string]: (window: any, token: any, mentionedRemoteUsers:
hashtag({ document }, { hashtag }) {
const a = document.createElement('a');
a.href = config.url + '/tags/' + hashtag;
a.textContent = '#' + hashtag;
a.href = `${config.url}/tags/${hashtag}`;
a.textContent = `#${hashtag}`;
a.setAttribute('rel', 'tag');
document.body.appendChild(a);
},