summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2018-08-18 12:11:14 +0900
committerAya Morisawa <AyaMorisawa4869@gmail.com>2018-08-19 00:20:36 +0900
commita4283c415aed7187456867ed5cd3d8168c7e8285 (patch)
treeefd7f2b7ac0868f7460f2c957d90a53458d39d41
parentimprove MFM to html (diff)
downloadmisskey-a4283c415aed7187456867ed5cd3d8168c7e8285.tar.gz
misskey-a4283c415aed7187456867ed5cd3d8168c7e8285.tar.bz2
misskey-a4283c415aed7187456867ed5cd3d8168c7e8285.zip
improve html to MFM
-rw-r--r--src/mfm/html-to-mfm.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mfm/html-to-mfm.ts b/src/mfm/html-to-mfm.ts
index daa228ec51..e8b1564958 100644
--- a/src/mfm/html-to-mfm.ts
+++ b/src/mfm/html-to-mfm.ts
@@ -49,6 +49,9 @@ export default function(html: string): string {
text += txt;
break;
}
+ // メンション以外
+ } else {
+ text += `[${txt}](${node.attrs.find((x: any) => x.name == 'href').value})`
}
if (node.childNodes) {