diff --git a/index.html b/index.html index 9e05ed68..e2440eb1 100644 --- a/index.html +++ b/index.html @@ -470,7 +470,6 @@ var fonts = lang.arrayToMap(
this.$rules = {
"start" : [ {
token : "text",
- merge : true,
regex : "<\\!\\[CDATA\\[",
next : "cdata"
},
@@ -480,13 +479,7 @@ var fonts = lang.arrayToMap(
regex : "\\]\\]>",
next : "start"
}, {
- token : "text",
- merge : true,
- regex : "\\s+"
- }, {
- token : "text",
- merge : true,
- regex : ".+"
+ defaultToken : "text"
} ]
};
In this extremly short sample, we're defining some highlighting rules for when Ace detectes a <![CDATA tag. When one is encountered, the tokenizer moves from start into the cdata state. It remains there, applying the text token to any string it encounters. Finally, when it hits a closing ]> symbol, it returns to the start state and continues to tokenize anything else.