diff --git a/packages/backend/src/mfm/from-html.ts b/packages/backend/src/mfm/from-html.ts index e3211cc25..011265ad7 100644 --- a/packages/backend/src/mfm/from-html.ts +++ b/packages/backend/src/mfm/from-html.ts @@ -62,22 +62,21 @@ export function fromHtml(html: string, hashtagNames?: string[]): string { const rel = node.attrs.find(x => x.name === 'rel'); const href = node.attrs.find(x => x.name === 'href'); - // ハッシュタグ + // hashtags if (hashtagNames && href && hashtagNames.map(x => x.toLowerCase()).includes(txt.toLowerCase())) { text += txt; - // メンション + // mentions } else if (txt.startsWith('@') && !(rel && rel.value.match(/^me /))) { const part = txt.split('@'); if (part.length === 2 && href) { - //#region ホスト名部分が省略されているので復元する + // restore the host name part const acct = `${txt}@${(new URL(href.value)).hostname}`; text += acct; - //#endregion } else if (part.length === 3) { text += txt; } - // その他 + // other } else { const generateLink = () => { if (!href && !txt) {