       .replace(/</g, '&lt;')
       .replace(/>/g, '&gt;')
 
-    classes = []
-    classes.push('indent-guide') if hasIndentGuide
     if @isHardTab
+      classes = []
+      classes.push('indent-guide') if hasIndentGuide
       classes.push('invisible') if invisibles.tab
       classes.push('hard-tab')
       classes = classes.join(' ')

          match = match.replace(/./g, invisibles.space) if invisibles.space
          "<span class='#{classes}'>#{match}</span>"
      if hasTrailingWhitespace
        classes.push('invisible') if invisibles.space
        classes.push('trailing-whitespace')
        classes = classes.join(' ')

        "<span class='#{classes}'>#{match}</span>"
    else
      if hasLeadingWhitespace
        classes = []
        classes.push('indent-guide') if hasIndentGuide
        classes.push('invisible') if invisibles.space
        classes.push('leading-whitespace')
        classes = classes.join(' ')
