summaryrefslogtreecommitdiff
path: root/src/mfm
diff options
context:
space:
mode:
authorAya Morisawa <AyaMorisawa4869@gmail.com>2018-09-01 23:12:51 +0900
committerAya Morisawa <AyaMorisawa4869@gmail.com>2018-09-01 23:12:51 +0900
commit291beb45fcb7a4c856232b12848ebad8267e2840 (patch)
tree8967c4a548ce8a0d19b5e4ef3c8eb37e0d3414d1 /src/mfm
parentfix #2315 (#2339) (diff)
downloadmisskey-291beb45fcb7a4c856232b12848ebad8267e2840.tar.gz
misskey-291beb45fcb7a4c856232b12848ebad8267e2840.tar.bz2
misskey-291beb45fcb7a4c856232b12848ebad8267e2840.zip
Use string interpolation
Diffstat (limited to 'src/mfm')
-rw-r--r--src/mfm/html-to-mfm.ts2
-rw-r--r--src/mfm/html.ts4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mfm/html-to-mfm.ts b/src/mfm/html-to-mfm.ts
index e2681f5447..b476a9af5c 100644
--- a/src/mfm/html-to-mfm.ts
+++ b/src/mfm/html-to-mfm.ts
@@ -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
diff --git a/src/mfm/html.ts b/src/mfm/html.ts
index c798ee410a..2e38fe10a0 100644
--- a/src/mfm/html.ts
+++ b/src/mfm/html.ts
@@ -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);
},