spaces are not treated as invisibles (matches textmate)
This commit is contained in:
parent
7d62c76128
commit
38be2616aa
1 changed files with 10 additions and 10 deletions
|
|
@ -221,18 +221,18 @@ var Text = function(parentEl) {
|
|||
};
|
||||
|
||||
this.$renderLine = function(stringBuilder, row, tokens) {
|
||||
if (this.$showInvisibles) {
|
||||
var self = this;
|
||||
var spaceRe = /[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]+/g;
|
||||
var spaceReplace = function(space) {
|
||||
var space = new Array(space.length+1).join(self.SPACE_CHAR);
|
||||
return "<span class='ace_invisible'>" + space + "</span>";
|
||||
};
|
||||
}
|
||||
else {
|
||||
// if (this.$showInvisibles) {
|
||||
// var self = this;
|
||||
// var spaceRe = /[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]+/g;
|
||||
// var spaceReplace = function(space) {
|
||||
// var space = new Array(space.length+1).join(self.SPACE_CHAR);
|
||||
// return "<span class='ace_invisible'>" + space + "</span>";
|
||||
// };
|
||||
// }
|
||||
// else {
|
||||
var spaceRe = /[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/g;
|
||||
var spaceReplace = " ";
|
||||
}
|
||||
// }
|
||||
|
||||
for ( var i = 0; i < tokens.length; i++) {
|
||||
var token = tokens[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue