     {from, pattern, scanFunc, scanRange} = options
     @editor[scanFunc] pattern, scanRange, (event) =>
       {matchText, range, stop} = event
-      return stop() if @shouldStopScan(which, from, range)
+      unless @allowNextLine or (from.row is range.start.row)
+        return stop()
       return if @isEscapedCharAtPoint(range.start)
       fn(event)
 

    pattern = ///[^\\]?#{_.escapeRegExp(char)}///
    ['close', 'open'][(countChar(text, pattern) % 2)]

  shouldStopScan: (which, from, range) ->
    if @allowNextLine
      false
    else
      from.row isnt range.start.row

  # Take start point of matched range.
  escapeChar = '\\'
  isEscapedCharAtPoint: (point) ->

    scanRange = new Range([0, 0], from)
    stack = []
    found = null
    @findPair 'open', {from, pattern, scanFunc, scanRange}, (event) =>
      {matchText, range, stop} = event
      [pairState, tagName] = @getPairState(event)
