forked from FoundKeyGang/FoundKey
Update parser.ts (#3999)
* Update parser.ts * Update parser.ts * Update parser.ts
This commit is contained in:
parent
71210595d2
commit
54ce19bd56
1 changed files with 2 additions and 3 deletions
|
@ -358,10 +358,9 @@ const mfm = P.createLanguage({
|
|||
title: r =>
|
||||
newline.then(P((input, i) => {
|
||||
const text = input.substr(i);
|
||||
const match = text.match(/^((【|\[)(.+?)(】|]))(\n|$)/);
|
||||
const match = text.match(/^([【\[]([^【\[】\]\n]+?)[】\]])(\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 q = match[2].trim();
|
||||
const contents = P.alt(
|
||||
r.big,
|
||||
r.small,
|
||||
|
|
Loading…
Reference in a new issue