[MFM] __ 構文はアルファベットのみに

This commit is contained in:
syuilo 2019-01-20 18:06:04 +09:00
parent 53481accf1
commit 1df9c1005f
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
3 changed files with 9 additions and 1 deletions

View file

@ -154,7 +154,7 @@ const mfm = P.createLanguage({
//#region Bold
bold: r =>
P.regexp(/(\*\*|__)([\s\S]+?)\1/, 2)
P.alt(P.regexp(/\*\*([\s\S]+?)\*\*/, 1), P.regexp(/__([a-zA-Z0-9\s]+?)__/, 1))
.map(x => createTree('bold', P.alt(
r.strike,
r.italic,