I found one annoying issue is about parsing Chinese punctuation:
Bug reproducing video here:
Also, I found the root cause is in the open source project GitHub - ProseMirror/prosemirror-markdown: ProseMirror Markdown integration. There are bugs in the parser. You can try with the following test cases in the test/test-parse.ts
:
console.log(
JSON.stringify(
defaultMarkdownParser.parse(
'这是一句中文,**这是一句包括标点加粗的中文。**这是一句中文。'
)
)
);
console.log(
JSON.stringify(
defaultMarkdownParser.parse(
'这是一句中文,**这是一句包括标点加粗的中文**。这是一句中文。'
)
)
);
it('parses Chines marks', () =>
same(
'这是一句中文,**这是一句包括标点加粗的中文。**这是一句中文。',
doc(
p(
'这是一句中文,',
strong('这是一句包括标点加粗的中文。'),
'这是一句中文。'
)
)
));
Later, after collecting enough issues, we can take a look and solve them together.