update syntax docs
This commit is contained in:
parent
4bc34f4eae
commit
7572a9543e
1 changed files with 1 additions and 8 deletions
|
|
@ -470,7 +470,6 @@ var fonts = lang.arrayToMap(
|
||||||
<pre><code class="language-javascript">this.$rules = {
|
<pre><code class="language-javascript">this.$rules = {
|
||||||
"start" : [ {
|
"start" : [ {
|
||||||
token : "text",
|
token : "text",
|
||||||
merge : true,
|
|
||||||
regex : "<\\!\\[CDATA\\[",
|
regex : "<\\!\\[CDATA\\[",
|
||||||
next : "cdata"
|
next : "cdata"
|
||||||
},
|
},
|
||||||
|
|
@ -480,13 +479,7 @@ var fonts = lang.arrayToMap(
|
||||||
regex : "\\]\\]>",
|
regex : "\\]\\]>",
|
||||||
next : "start"
|
next : "start"
|
||||||
}, {
|
}, {
|
||||||
token : "text",
|
defaultToken : "text"
|
||||||
merge : true,
|
|
||||||
regex : "\\s+"
|
|
||||||
}, {
|
|
||||||
token : "text",
|
|
||||||
merge : true,
|
|
||||||
regex : ".+"
|
|
||||||
} ]
|
} ]
|
||||||
};</code></pre>
|
};</code></pre>
|
||||||
<p>In this extremly short sample, we're defining some highlighting rules for when Ace detectes a <code><![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>]></code> symbol, it returns to the <code>start</code> state and continues to tokenize anything else.</p>
|
<p>In this extremly short sample, we're defining some highlighting rules for when Ace detectes a <code><![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>]></code> symbol, it returns to the <code>start</code> state and continues to tokenize anything else.</p>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue