Skip to content

Commit 1721c4d

Browse files
authored
fix: list auto complete
1 parent 84f7e2e commit 1721c4d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/editor/index.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -409,18 +409,18 @@ class Editor extends React.Component<EditorProps, EditorState> {
409409
};
410410

411411
// Enter key, check previous line
412-
const isSymbol = lineInfo.curLine.match(/^(\s?)([-*]) /);
412+
const isSymbol = lineInfo.curLine.match(/^(\s*?)\* /);
413413
if (isSymbol) {
414-
if (/^(\s?)([-*]) $/.test(lineInfo.curLine)) {
414+
if (/^(\s*?)\\* $/.test(lineInfo.curLine)) {
415415
emptyCurrentLine();
416416
return;
417417
}
418418
addSymbol(isSymbol[0]);
419419
return;
420420
}
421-
const isOrderList = lineInfo.curLine.match(/^(\s?)(\d+)\. /);
421+
const isOrderList = lineInfo.curLine.match(/^(\s*?)(\d+)\. /);
422422
if (isOrderList) {
423-
if (/^(\s?)(\d+)\. $/.test(lineInfo.curLine)) {
423+
if (/^(\s*?)(\d+)\. $/.test(lineInfo.curLine)) {
424424
emptyCurrentLine();
425425
return;
426426
}

0 commit comments

Comments
 (0)