From 53481accf13cbb6227d12e98542b0f314b2a586e Mon Sep 17 00:00:00 2001 From: ibrokemypie Date: Sun, 20 Jan 2019 20:00:55 +1100 Subject: Add double underscore syntax for bold markdown (#3733) * Add double underscore syntax for bold markdown see https://github.com/syuilo/misskey/pull/3732 this allows bold text through either **text** or __text__ * Add tests for underscore bold mfm syntax --- src/mfm/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mfm/parser.ts b/src/mfm/parser.ts index 2ab38d97a8..c271b62e23 100644 --- a/src/mfm/parser.ts +++ b/src/mfm/parser.ts @@ -154,7 +154,7 @@ const mfm = P.createLanguage({ //#region Bold bold: r => - P.regexp(/\*\*([\s\S]+?)\*\*/, 1) + P.regexp(/(\*\*|__)([\s\S]+?)\1/, 2) .map(x => createTree('bold', P.alt( r.strike, r.italic, -- cgit v1.2.3-freya