File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 4646
4747 // Rough heuristic to try and detect lines that are part of multi-line string
4848 function probablyInsideString ( cm , pos , line ) {
49- return / \b s t r i n g \b / . test ( cm . getTokenTypeAt ( Pos ( pos . line , 0 ) ) ) && ! / ^ [ \' \" ` ] / . test ( line )
49+ return / \b s t r i n g \b / . test ( cm . getTokenTypeAt ( Pos ( pos . line , 0 ) ) ) && ! / ^ [ \' \" \ `] / . test ( line )
5050 }
5151
5252 function getMode ( cm , pos ) {
176176 endLine = self . getLine ( -- end ) ;
177177 close = endLine . indexOf ( endString ) ;
178178 }
179+ var insideStart = Pos ( start , open + 1 ) , insideEnd = Pos ( end , close + 1 )
179180 if ( close == - 1 ||
180- ! / c o m m e n t / . test ( self . getTokenTypeAt ( Pos ( start , open + 1 ) ) ) ||
181- ! / c o m m e n t / . test ( self . getTokenTypeAt ( Pos ( end , close + 1 ) ) ) )
181+ ! / c o m m e n t / . test ( self . getTokenTypeAt ( insideStart ) ) ||
182+ ! / c o m m e n t / . test ( self . getTokenTypeAt ( insideEnd ) ) ||
183+ self . getRange ( insideStart , insideEnd , "\n" ) . indexOf ( endString ) > - 1 )
182184 return false ;
183185
184186 // Avoid killing block comments completely outside the selection.
You can’t perform that action at this time.
0 commit comments