proper white space matching

This commit is contained in:
Fabian Jakobs 2010-04-23 12:04:41 +02:00
commit a02b64c510

View file

@ -103,9 +103,8 @@ ace.layer.Text = function(parentEl) {
var output = token.value
.replace(/&/g, "&")
.replace(/</g, "&lt;")
.replace(/ /g, "&nbsp;")
.replace(/\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000/g, "&nbsp;")
.replace(/\t/g, this.$tabString);
// TODO: proper space matching!
if (token.type !== "text") {
stringBuilder.push("<span class='", token.type, "'>", output, "</span>");