From 45765eaeaba4833cb0288bb0d2db5d96b7999451 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 8 Nov 2020 16:35:22 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A2=E3=82=B9=E3=82=BF=E3=83=AA=E3=82=B9?= =?UTF-8?q?=E3=82=AF3=E3=81=A4=E3=81=A7=E3=81=AEtada=E3=82=A2=E3=83=8B?= =?UTF-8?q?=E3=83=A1=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=92=E5=BE=A9?= =?UTF-8?q?=E6=B4=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mfm/language.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mfm/language.ts b/src/mfm/language.ts index 8e15ca43b..cf00f0632 100644 --- a/src/mfm/language.ts +++ b/src/mfm/language.ts @@ -58,6 +58,7 @@ export const mfmLanguage = P.createLanguage({ return P.makeSuccess(i + match[0].length, createLeaf('blockCode', { code: match[2], lang: match[1] ? match[1].trim() : null })); })), inline: r => P.alt( + r.big, r.bold, r.small, r.italic, @@ -72,6 +73,11 @@ export const mfmLanguage = P.createLanguage({ r.fn, r.text ), + // TODO: そのうち消す + big: r => P.regexp(/^\*\*\*([\s\S]+?)\*\*\*/, 1).map(x => createTree('fn', r.inline.atLeast(1).tryParse(x), { + name: 'tada', + args: {} + })), bold: r => { const asterisk = P.regexp(/\*\*([\s\S]+?)\*\*/, 1); const underscore = P.regexp(/__([a-zA-Z0-9\s]+?)__/, 1);