From 875555d9330eb80f6743d6f80d7f971fab2baeff Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 25 Apr 2013 10:02:33 -0700 Subject: [PATCH] Rename invisible class to invisible-character Bootstrap defines this class with visibility: hidden which we don't want since invisible characters should be visible. --- spec/app/editor-spec.coffee | 2 +- src/app/editor.coffee | 4 ++-- src/app/token.coffee | 6 +++--- static/editor.less | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/app/editor-spec.coffee b/spec/app/editor-spec.coffee index 2b54d9e7d..8974abbf8 100644 --- a/spec/app/editor-spec.coffee +++ b/spec/app/editor-spec.coffee @@ -1426,7 +1426,7 @@ describe "Editor", -> editor.setShowInvisibles(true) editor.attachToDom() editor.setText "var" - expect(editor.find('.line').html()).toBe 'var' + expect(editor.find('.line').html()).toBe 'var¬' it "allows invisible glyphs to be customized via config.editor.invisibles", -> editor.setText(" \t ") diff --git a/src/app/editor.coffee b/src/app/editor.coffee index e04c409d3..caec03db8 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -1504,9 +1504,9 @@ class Editor extends View popScope() while scopeStack.length > 0 if invisibles and not @mini and not screenLine.isSoftWrapped() if invisibles.cr and screenLine.lineEnding is '\r\n' - line.push("") + line.push("#{invisibles.cr}") if invisibles.eol - line.push("") + line.push("#{invisibles.eol}") line.push("") if fold diff --git a/src/app/token.coffee b/src/app/token.coffee index 9c3d50ed8..01707dd2d 100644 --- a/src/app/token.coffee +++ b/src/app/token.coffee @@ -74,7 +74,7 @@ class Token if @isHardTab classes = [] classes.push('indent-guide') if hasIndentGuide - classes.push('invisible') if invisibles.tab + classes.push('invisible-character') if invisibles.tab classes.push('hard-tab') classes = classes.join(' ') html = html.replace /^./, (match) -> @@ -84,7 +84,7 @@ class Token if hasLeadingWhitespace classes = [] classes.push('indent-guide') if hasIndentGuide - classes.push('invisible') if invisibles.space + classes.push('invisible-character') if invisibles.space classes.push('leading-whitespace') classes = classes.join(' ') html = html.replace /^[ ]+/, (match) -> @@ -93,7 +93,7 @@ class Token if hasTrailingWhitespace classes = [] classes.push('indent-guide') if hasIndentGuide - classes.push('invisible') if invisibles.space + classes.push('invisible-character') if invisibles.space classes.push('trailing-whitespace') classes = classes.join(' ') html = html.replace /[ ]+$/, (match) -> diff --git a/static/editor.less b/static/editor.less index 61ed9ac1b..7e81c9cab 100644 --- a/static/editor.less +++ b/static/editor.less @@ -80,7 +80,7 @@ background: rgba(0, 0, 0, 0); } -.editor .invisible { +.editor .invisible-character { opacity: 0.2; font-weight: normal !important; font-style: normal !important;