     filters = @getFilters()
     options = {@editor, from, filters, @allowNextLine, @allowForwarding}
 
-    return unless closeRange = findCloseTagRangeForward(options)
+    return unless closeRange = findClosePairRangeForward(findTagRange, options)
 
     options.from = closeRange.end
-    return unless openRange = findOpenTagRangeBackward(options)
+    return unless openRange = findOpenPairRangeBackward(findTagRange, options)
 
     aRange = new Range(openRange.start, closeRange.end)
     innerRange = new Range(openRange.end, closeRange.start)


  return range

findClosePairRangeForward = (options, fn) ->
  {allowForwarding, from} = options
  delete options.allowForwarding

  findPairRange 'close', 'forward', options, (stack, openEvent) ->
    unless openEvent?
      return true


      {start} = openEvent.range
      start.isEqual(from) or (allowForwarding and start.row is from.row)

findOpenPairRangeBackward = (finder, options) ->
  finder 'open', 'backward', options, (stack, openEvent) ->
    stack.length is 0

getPairRangeInformation = (options) ->
  if closeRange = findClosePairRangeForward(findPairRange, options)
    options.from = closeRange.end
    openRange = findOpenPairRangeBackward(findPairRange, options)

  if openRange?
    {
