All full width characters should be styled with double character width
This commit is contained in:
parent
21a79fea65
commit
7fa4d37f57
1 changed files with 4 additions and 3 deletions
|
|
@ -303,9 +303,10 @@ var Text = function(parentEl) {
|
||||||
.replace(/</g, "<")
|
.replace(/</g, "<")
|
||||||
.replace(spaceRe, spaceReplace)
|
.replace(spaceRe, spaceReplace)
|
||||||
.replace(/\t/g, _self.$tabString)
|
.replace(/\t/g, _self.$tabString)
|
||||||
.replace(/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF]/g, function(c) {
|
.replace(/[\u1100-\u115F]|[\u11A3-\u11A7]|[\u11FA-\u11FF]|[\u2329-\u232A]|[\u2E80-\u2E99]|[\u2E9B-\u2EF3]|[\u2F00-\u2FD5]|[\u2FF0-\u2FFB]|[\u3000-\u303E]|[\u3041-\u3096]|[\u3099-\u30FF]|[\u3105-\u312D]|[\u3131-\u318E]|[\u3190-\u31BA]|[\u31C0-\u31E3]|[\u31F0-\u321E]|[\u3220-\u3247]|[\u3250-\u32FE]|[\u3300-\u4DBF]|[\u4E00-\uA48C]|[\uA490-\uA4C6]|[\uA960-\uA97C]|[\uAC00-\uD7A3]|[\uD7B0-\uD7C6]|[\uD7CB-\uD7FB]|[\uF900-\uFAFF]|[\uFE10-\uFE19]|[\uFE30-\uFE52]|[\uFE54-\uFE66]|[\uFE68-\uFE6B]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g,
|
||||||
return "<span class='ace_cjk' style='width:" + (characterWidth * 2) + "px'>" + c + "</span>"
|
function(c) {
|
||||||
});
|
return "<span class='ace_cjk' style='width:" + (characterWidth * 2) + "px'>" + c + "</span>"
|
||||||
|
});
|
||||||
|
|
||||||
if (!_self.$textToken[token.type]) {
|
if (!_self.$textToken[token.type]) {
|
||||||
var classes = "ace_" + token.type.replace(/\./g, " ace_");
|
var classes = "ace_" + token.type.replace(/\./g, " ace_");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue