From 2018edcdec23f0a7e7e432d0db638b596f6b2153 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 21 Nov 2018 08:32:40 +0900 Subject: [PATCH] Improve MFM --- src/mfm/parser.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mfm/parser.ts b/src/mfm/parser.ts index 4ad38d7a2..3831a86aa 100644 --- a/src/mfm/parser.ts +++ b/src/mfm/parser.ts @@ -63,6 +63,7 @@ const mfm = P.createLanguage({ P.regexp(/^\*\*\*([\s\S]+?)\*\*\*/, 1) .map(x => makeNodeWithChildren('big', P.alt( r.mention, + r.hashtag, r.emoji, r.text ).atLeast(1).tryParse(x))), @@ -85,6 +86,7 @@ const mfm = P.createLanguage({ P.regexp(/\*\*([\s\S]+?)\*\*/, 1) .map(x => makeNodeWithChildren('bold', P.alt( r.mention, + r.hashtag, r.emoji, r.text ).atLeast(1).tryParse(x))), @@ -176,6 +178,7 @@ const mfm = P.createLanguage({ .map(x => makeNodeWithChildren('motion', P.alt( r.bold, r.mention, + r.hashtag, r.emoji, r.text ).atLeast(1).tryParse(x))),