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 = {
|
||||
"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"
|
||||
} ]
|
||||
};</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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue