You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// plate/packages/autoformat/src/lib/withAutoformat.tseditor.insertText=(text)=>{if(!isCollapsed(editor.selection))returninsertText(text);if(getCodeLineEntry(editor))returninsertText(text);// I'm not sure if adding this processing here is too muchfor(construleofgetOptions().rules!){const{ insertTrigger, mode ='text', query }=rule;if(query&&!query(editorasany,{ ...rule, text }))continue;constautoformatter: Record<typeofmode,any> = {block: autoformatBlock,mark: autoformatMark,text: autoformatText,};
if (
autoformatter[mode]?.(editor, {
...(ruleasany),text,})
) {returninsertTrigger&&insertText(text);}}insertText(text);};
Description
Autoformat should not take effect within code blocks
Reproduction URL
No response
Reproduction steps
Plate version
39.2.15
Slate React version
0.110.3
Screenshots
No response
Logs
No response
Browsers
No response
The text was updated successfully, but these errors were encountered: