nl_tokens: Find start and end index of text line for <code > from< / code > index
pl_tokens: function ( text , from ) { var len = <mask> . length , start = 0 , end = len - 1 ; // search left for ( var i = from - 1 ; i > 0 ; i -- ) { var ch = text . charAt ( i ) ; if ( ch == '\n' || ch == '\r' ) { start = i + 1 ; break ; } } // search right for ( var j = from ; j < len ; j ++ ) { var ch = text . charAt ( j ) ; if ( ch == '\n' || ch == '\r' ) { end = j ; break ; } } return require ( 'range' ) . create ( start , end - start ) ; }