diff --git a/src/app/token.coffee b/src/app/token.coffee
index e141dd7bf..657e6658b 100644
--- a/src/app/token.coffee
+++ b/src/app/token.coffee
@@ -72,13 +72,13 @@ class Token
if invisibles
if @isHardTab and invisibles.tab
- html = html.replace(/^./, "#{invisibles.tab}")
+ html = html.replace(/^./, "#{invisibles.tab}")
else if invisibles.space
if hasLeadingWhitespace
html = html.replace /^[ ]+/, (match) ->
- "#{match.replace(/./g, invisibles.space)}"
+ "#{match.replace(/./g, invisibles.space)}"
if hasTrailingWhitespace
html = html.replace /[ ]+$/, (match) ->
- "#{match.replace(/./g, invisibles.space)}"
+ "#{match.replace(/./g, invisibles.space)}"
html