     unpairedCount = 0
     @editor.scanInBufferRange @getTagPattern(tagName), scanRange, ({match, range, stop}) =>
       return if @isRangeCommented(range)
+
       if match[1]
         unpairedCount++
       else

    return unless @isCursorOnTag()

    ranges = null
    endPosition = @editor.getCursor().getCurrentWordBufferRange(wordRegex: /[^>]*/).end
    @editor.backwardsScanInBufferRange /(<(\/?))([^\s>]+)([\s>]|$)/, [[0, 0], endPosition], ({match, range, stop}) =>
      stop()

      [entireMatch, prefix, isClosingTag, tagName, suffix] = match

  constructor: (@editorView) ->
    {@editor} = @editorView

    @tagPattern = /(<(\/?))([^\s>]+)([\s>]|$)/
    @wordRegex = /[^>]*/
    @tagSelector = new ScopeSelector('meta.tag | punctuation.definition.tag')
    @commentSelector = new ScopeSelector('comment.*')

