From b0489abd7f0ea3ac680332ce37dd082f63127ea5 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Sun, 13 Nov 2022 13:47:22 +0100 Subject: [PATCH] translate japanese comments --- packages/backend/src/mfm/from-html.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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) {