Skip to content

Commit

Permalink
fix: update list type regex to avoid content lost
Browse files Browse the repository at this point in the history
Fixed #194
  • Loading branch information
jiawei686 committed Apr 13, 2022
1 parent fdb1ec7 commit 5c4a44e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/hooks/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function getListStyle(m2) {

// 标识符处理
function handleMark(str, node) {
const listRegex = /^((([*+-]|\d+[.]|[a-z]\.|[I一二三四五六七八九十]+\.)[ \t]+)([^\r]+?)($|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.]|[a-z]\.|[I一二三四五六七八九十]+\.)[ \t]+)))/;
const listRegex = /^((([*+-]|\d+[.]|[a-z]\.|[I一二三四五六七八九十]+\.)[ \t]+)([^\r]*?)($|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.]|[a-z]\.|[I一二三四五六七八九十]+\.)[ \t]+)))/;
if (!listRegex.test(str)) {
node.type = 'blank';
return str;
Expand Down

0 comments on commit 5c4a44e

Please sign in to comment.