File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -536,9 +536,11 @@ export class TextAreaAutoComplete {
536
536
#update( ) {
537
537
let before = this . helper . getBeforeCursor ( ) ;
538
538
if ( before ?. length ) {
539
- const m = before . match ( / ( [ ^ \s | , | ; | " ] + ) $ / ) ;
539
+ const m = before . match ( / ( [ ^ , ; " | { } ( ) \n ] + ) $ / ) ;
540
540
if ( m ) {
541
- before = m [ 0 ] ;
541
+ before = m [ 0 ]
542
+ . replace ( / ^ \s + / , "" )
543
+ . replace ( / \s / g, "_" ) || null ;
542
544
} else {
543
545
before = null ;
544
546
}
@@ -619,6 +621,10 @@ export class TextAreaAutoComplete {
619
621
value = TextAreaAutoComplete . replacer ( value ) ;
620
622
}
621
623
value = this . #escapeParentheses( value ) ;
624
+
625
+ // Remove underscore
626
+ value = value . replace ( / _ / g, " " ) ;
627
+
622
628
const afterCursor = this . helper . getAfterCursor ( ) ;
623
629
const shouldAddSeparator = ! afterCursor . trim ( ) . startsWith ( this . separator . trim ( ) ) ;
624
630
this . helper . insertAtCursor (
You can’t perform that action at this time.
0 commit comments