File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1464,7 +1464,8 @@ VimLParser.prototype.parse_cmd_function = function() {
1464
1464
this . reader . skip_white ( ) ;
1465
1465
if ( left . type == NODE_IDENTIFIER ) {
1466
1466
var s = left . value ;
1467
- if ( s [ 0 ] != "<" && ! isupper ( s [ 0 ] ) && viml_stridx ( s , ":" ) == - 1 && viml_stridx ( s , "#" ) == - 1 ) {
1467
+ var ss = viml_split ( s , "\\zs" ) ;
1468
+ if ( ss [ 0 ] != "<" && ! isupper ( ss [ 0 ] ) && viml_stridx ( s , ":" ) == - 1 && viml_stridx ( s , "#" ) == - 1 ) {
1468
1469
throw Err ( viml_printf ( "E128: Function name must start with a capital or contain a colon: %s" , s ) , left . pos ) ;
1469
1470
}
1470
1471
}
Original file line number Diff line number Diff line change @@ -1176,7 +1176,8 @@ def parse_cmd_function(self):
1176
1176
self .reader .skip_white ()
1177
1177
if left .type == NODE_IDENTIFIER :
1178
1178
s = left .value
1179
- if s [0 ] != "<" and not isupper (s [0 ]) and viml_stridx (s , ":" ) == - 1 and viml_stridx (s , "#" ) == - 1 :
1179
+ ss = viml_split (s , "\\ zs" )
1180
+ if ss [0 ] != "<" and not isupper (ss [0 ]) and viml_stridx (s , ":" ) == - 1 and viml_stridx (s , "#" ) == - 1 :
1180
1181
raise VimLParserException (Err (viml_printf ("E128: Function name must start with a capital or contain a colon: %s" , s ), left .pos ))
1181
1182
# :function {name}
1182
1183
if self .reader .peekn (1 ) != "(" :
You can’t perform that action at this time.
0 commit comments