Fix rendering of tab characters and add realTabs to JavaScript example

This commit is contained in:
Julian Viereck 2011-01-28 22:00:41 +08:00 committed by Fabian Jakobs
commit a9248cab32
2 changed files with 2 additions and 2 deletions

View file

@ -107,7 +107,7 @@
<script type="text/editor" id="jstext">function foo(items) {
for (var i=0; i<items.length; i++) {
alert(items[i] + "juhu");
alert(items[i] + "juhu");
}
}</script>

View file

@ -279,7 +279,7 @@ var Text = function(parentEl) {
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(spaceRe, spaceReplace)
.replace(/\t/g, this.$tabString)
.replace(/\t/g, _self.$tabString)
.replace(/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF]/g, function(c) {
return "<span class='ace_cjk' style='width:" + (characterWidth * 2) + "px'>" + c + "</span>"
});