[MFM] Better MFM parsing

This commit is contained in:
syuilo 2018-12-01 10:40:09 +09:00
parent 9b23ebd4a3
commit fe707f88a4
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
3 changed files with 25 additions and 47 deletions

View file

@ -254,7 +254,7 @@ const mfm = P.createLanguage({
const qInner = quote.join('\n').replace(/^>/gm, '').replace(/^ /gm, '');
if (qInner == '') return P.makeFailure(i, 'not a quote');
const contents = r.root.tryParse(qInner);
return P.makeSuccess(i + quote.join('\n').length, makeNodeWithChildren('quote', contents));
return P.makeSuccess(i + quote.join('\n').length + 1, makeNodeWithChildren('quote', contents));
})),
//#endregion