[MFM] Improve title syntax detection
This commit is contained in:
parent
7dcea49be7
commit
085325e65f
3 changed files with 9 additions and 0 deletions
|
@ -361,6 +361,7 @@ const mfm = P.createLanguage({
|
|||
const match = text.match(/^((【|\[)(.+?)(】|]))(\n|$)/);
|
||||
if (!match) return P.makeFailure(i, 'not a title');
|
||||
const q = match[1].trim().substring(1, match[1].length - 1);
|
||||
if (q.includes('】')) return P.makeFailure(i, 'not a title');
|
||||
const contents = P.alt(
|
||||
r.big,
|
||||
r.small,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue