File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,10 @@ class Editor extends React.Component<EditorProps, EditorState> {
191
191
}
192
192
}
193
193
194
+ isComposing ( ) {
195
+ return this . composing ;
196
+ }
197
+
194
198
private getPlugins ( ) {
195
199
let plugins : Plugin [ ] = [ ] ;
196
200
if ( this . props . plugins ) {
@@ -387,7 +391,7 @@ class Editor extends React.Component<EditorProps, EditorState> {
387
391
private handleEditorKeyDown ( e : React . KeyboardEvent < HTMLTextAreaElement > ) {
388
392
const { keyCode, key, currentTarget } = e ;
389
393
if ( ( keyCode === 13 || key === 'Enter' ) && this . composing === false ) {
390
- const text = e . currentTarget . value ;
394
+ const text = currentTarget . value ;
391
395
const curPos = currentTarget . selectionStart ;
392
396
const lineInfo = getLineAndCol ( text , curPos ) ;
393
397
@@ -411,7 +415,7 @@ class Editor extends React.Component<EditorProps, EditorState> {
411
415
// Enter key, check previous line
412
416
const isSymbol = lineInfo . curLine . match ( / ^ ( \s * ?) \* / ) ;
413
417
if ( isSymbol ) {
414
- if ( / ^ ( \s * ?) \\ * $ / . test ( lineInfo . curLine ) ) {
418
+ if ( / ^ ( \s * ?) \* $ / . test ( lineInfo . curLine ) ) {
415
419
emptyCurrentLine ( ) ;
416
420
return ;
417
421
}
You can’t perform that action at this time.
0 commit comments