fix(web): markdown list auto-completion creates new line correctly (#5238)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
c54fcf7aa7
commit
bd21338fdb
1 changed files with 2 additions and 1 deletions
|
|
@ -164,7 +164,8 @@ const Editor = forwardRef(function Editor(props: Props, ref: React.ForwardedRef<
|
||||||
// Detect list item using regex-based detection
|
// Detect list item using regex-based detection
|
||||||
const listInfo = detectLastListItem(prevContent);
|
const listInfo = detectLastListItem(prevContent);
|
||||||
if (listInfo.type) {
|
if (listInfo.type) {
|
||||||
const insertText = generateListContinuation(listInfo);
|
event.preventDefault();
|
||||||
|
const insertText = "\n" + generateListContinuation(listInfo);
|
||||||
editorActions.insertText(insertText);
|
editorActions.insertText(insertText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue