~ubuntu-branches/ubuntu/trusty/yelp-xsl/trusty

« back to all changes in this revision

Viewing changes to js/jquery.syntax.brush.kai.js

  • Committer: Bazaar Package Importer
  • Author(s): Michael Terry
  • Date: 2011-07-09 10:02:21 UTC
  • mto: (11.1.1 experimental) (1.3.1)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20110709100221-27hsncxrd63leyx4
Tags: upstream-3.1.2
ImportĀ upstreamĀ versionĀ 3.1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// brush: "kai" aliases: []
 
2
 
 
3
//      This file is part of the "jQuery.Syntax" project, and is distributed under the MIT License.
 
4
//      Copyright (c) 2011 Samuel G. D. Williams. <http://www.oriontransfer.co.nz>
 
5
//      See <jquery.syntax.js> for licensing details.
 
6
 
 
7
Syntax.register('kai', function(brush) {
 
8
        brush.push(['(', ')', '[', ']', '{', '}'], {klass: 'operator'});
 
9
        
 
10
        brush.push(Syntax.lib.perlStyleComment);
 
11
        
 
12
        brush.push(Syntax.lib.decimalNumber);
 
13
        brush.push(Syntax.lib.webLink);
 
14
        
 
15
        brush.push({
 
16
                pattern: /\(([^\s\(\)]+)/gi,
 
17
                matches: Syntax.extractMatches({klass: 'function'})
 
18
        });
 
19
        
 
20
        brush.push({
 
21
                pattern: /`[a-z]*/gi,
 
22
                klass: 'constant'
 
23
        })
 
24
        
 
25
        // Strings
 
26
        brush.push(Syntax.lib.multiLineDoubleQuotedString);
 
27
        brush.push(Syntax.lib.stringEscape);
 
28
});
 
29