Place entire hard tab value inside span

Previously only the first character was included in the span.
This commit is contained in:
Kevin Sawicki & Nathan Sobo
2013-12-05 17:09:24 -08:00
committed by Kevin Sawicki
parent 18057e303b
commit 7ae432fad5

View File

@@ -135,9 +135,8 @@ class Token
classes = 'hard-tab'
classes += ' indent-guide' if hasIndentGuide
classes += ' invisible-character' if invisibles.tab
html = @value.replace StartCharacterRegex, (match) =>
match = invisibles.tab ? match
"<span class='#{classes}'>#{@escapeString(match)}</span>"
value = @value.replace(StartCharacterRegex, invisible.tab) if invisible.tab
html = "<span class='#{classes}'>#{@escapeString(value)}</span>"
else
startIndex = 0
endIndex = @value.length