Don't show indent guide in truly trailing whitespace

Lines that are all whitespace are considered trailing
whitespace and should display the indent guide.

But lines with leading and trailing whitespace should never
have the indent guide rendered in the trailing area.
This commit is contained in:
Kevin Sawicki
2013-05-02 11:42:12 -07:00
parent 67f96e0fdd
commit 10ca03f238
2 changed files with 10 additions and 1 deletions

View File

@@ -92,7 +92,7 @@ class Token
"<span class='#{classes}'>#{match}</span>"
if hasTrailingWhitespace
classes = []
classes.push('indent-guide') if hasIndentGuide
classes.push('indent-guide') if hasIndentGuide and not hasLeadingWhitespace
classes.push('invisible-character') if invisibles.space
classes.push('trailing-whitespace')
classes = classes.join(' ')