File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 254254 if ( current == ":" && ! state . lambda && top ( state ) . type == "py" )
255255 pushPyScope ( state ) ;
256256
257- var delimiter_index = current . length == 1 ? "[({" . indexOf ( current ) : - 1 ;
258- if ( delimiter_index != - 1 )
259- pushBracketScope ( stream , state , "])}" . slice ( delimiter_index , delimiter_index + 1 ) ) ;
260-
261- delimiter_index = "])}" . indexOf ( current ) ;
262- if ( delimiter_index != - 1 ) {
263- if ( top ( state ) . type == current ) state . indent = state . scopes . pop ( ) . offset - hangingIndent
264- else return ERRORCLASS ;
257+ if ( current . length == 1 && ! / s t r i n g | c o m m e n t / . test ( style ) ) {
258+ var delimiter_index = "[({" . indexOf ( current ) ;
259+ if ( delimiter_index != - 1 )
260+ pushBracketScope ( stream , state , "])}" . slice ( delimiter_index , delimiter_index + 1 ) ) ;
261+
262+ delimiter_index = "])}" . indexOf ( current ) ;
263+ if ( delimiter_index != - 1 ) {
264+ if ( top ( state ) . type == current ) state . indent = state . scopes . pop ( ) . offset - hangingIndent
265+ else return ERRORCLASS ;
266+ }
265267 }
266268 if ( state . dedent > 0 && stream . eol ( ) && top ( state ) . type == "py" ) {
267269 if ( state . scopes . length > 1 ) state . scopes . pop ( ) ;
You can’t perform that action at this time.
0 commit comments