From 33d79420eb3c860d377258289b87def4a69c6778 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 19 Jun 2019 17:47:24 +0900 Subject: [PATCH] Fix code style --- src/mfm/language.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mfm/language.ts b/src/mfm/language.ts index 4750ea3380..75a2baaab9 100644 --- a/src/mfm/language.ts +++ b/src/mfm/language.ts @@ -157,12 +157,14 @@ export const mfmLanguage = P.createLanguage({ let url: string; if (!match) { const match = text.match(/^<(https?:\/\/.*?)>/); - if (!match) + if (!match) { return P.makeFailure(i, 'not a url'); + } url = match[1]; i += 2; - } else + } else { url = match[0]; + } url = removeOrphanedBrackets(url); while (url.endsWith('.') || url.endsWith(',')) { if (url.endsWith('.')) url = url.substr(0, url.lastIndexOf('.'));