Fix rendering width of ideographic space (U+3000)
This commit is contained in:
parent
829b0cd241
commit
e607ee24a3
1 changed files with 7 additions and 0 deletions
|
|
@ -349,6 +349,13 @@ var Text = function(parentEl) {
|
|||
return "&";
|
||||
} else if (c == "<") {
|
||||
return "<";
|
||||
} else if (c == "\u3000") {
|
||||
// U+3000 is both invisible AND full-width, so must be handled uniquely
|
||||
var classToUse = self.showInvisibles ? "ace_cjk ace_invisible" : "ace_cjk";
|
||||
screenColumn += 1;
|
||||
return "<span class='" + classToUse + "' style='width:" +
|
||||
(self.config.characterWidth * 2) +
|
||||
"px'>" + c + "</span>";
|
||||
} else if (c.match(/[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/)) {
|
||||
if (self.showInvisibles) {
|
||||
var space = new Array(c.length+1).join(self.SPACE_CHAR);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue