Skip to content

Commit 7572a95

Browse files
committed
update syntax docs
1 parent 4bc34f4 commit 7572a95

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

index.html

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,6 @@ <h2 id="defining-states"><a class="heading_anchor" href="#defining-states"><i cl
470470
<pre><code class="language-javascript">this.$rules = {
471471
"start" : [ {
472472
token : "text",
473-
merge : true,
474473
regex : "&lt;\\!\\[CDATA\\[",
475474
next : "cdata"
476475
},
@@ -480,13 +479,7 @@ <h2 id="defining-states"><a class="heading_anchor" href="#defining-states"><i cl
480479
regex : "\\]\\]&gt;",
481480
next : "start"
482481
}, {
483-
token : "text",
484-
merge : true,
485-
regex : "\\s+"
486-
}, {
487-
token : "text",
488-
merge : true,
489-
regex : ".+"
482+
defaultToken : "text"
490483
} ]
491484
};</code></pre>
492485
<p>In this extremly short sample, we're defining some highlighting rules for when Ace detectes a <code>&lt;![CDATA</code> tag. When one is encountered, the tokenizer moves from <code>start</code> into the <code>cdata</code> state. It remains there, applying the <code>text</code> token to any string it encounters. Finally, when it hits a closing <code>]&gt;</code> symbol, it returns to the <code>start</code> state and continues to tokenize anything else.</p>

0 commit comments

Comments
 (0)