utopia 1.9.2 → 1.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/documentation/.bowerrc +2 -2
- data/documentation/pages/_page.xnode +11 -0
- data/documentation/pages/wiki/controller/actions/content.md +76 -68
- data/documentation/pages/wiki/controller/rewrite/content.md +69 -64
- data/documentation/pages/wiki/controller.rb +6 -1
- data/documentation/pages/wiki/development-environment-setup/content.md +16 -14
- data/documentation/pages/wiki/server-setup/content.md +46 -40
- data/documentation/pages/wiki/show.xnode +1 -1
- data/documentation/pages/wiki/your-first-page/content.md +36 -31
- data/documentation/public/_components/jquery/core.js +482 -0
- data/documentation/public/_components/jquery/jquery.js +10220 -0
- data/documentation/public/_components/jquery/jquery.min.js +4 -0
- data/documentation/public/_components/jquery/jquery.min.map +1 -0
- data/documentation/public/_components/jquery/jquery.slim.js +8107 -0
- data/documentation/public/_components/jquery/jquery.slim.min.js +4 -0
- data/documentation/public/_components/jquery/jquery.slim.min.map +1 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/040afc1428b286fb3c50151378b349a6149698d3/jquery.syntax.core.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/098642d80a1682613dca2bba6fd0a3bc9fd2bf04/jquery.syntax.layout.editor.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/098642d80a1682613dca2bba6fd0a3bc9fd2bf04/jquery.syntax.layout.fixed.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/098642d80a1682613dca2bba6fd0a3bc9fd2bf04/jquery.syntax.layout.inline.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/098642d80a1682613dca2bba6fd0a3bc9fd2bf04/jquery.syntax.layout.list.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/098642d80a1682613dca2bba6fd0a3bc9fd2bf04/jquery.syntax.layout.plain.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/098642d80a1682613dca2bba6fd0a3bc9fd2bf04/jquery.syntax.layout.table.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/10c58b30c53bf84f8360af8a864797092be26882/jquery.syntax.core.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/10c58b30c53bf84f8360af8a864797092be26882/jquery.syntax.layout.fixed.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/10c58b30c53bf84f8360af8a864797092be26882/jquery.syntax.layout.inline.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/_layout.scssc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.apache.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.applescript.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.assembly.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.bash-script.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.bash.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.clang.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.css.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.diff.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.html.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.ocaml.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.protobuf.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.python.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.ruby.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.xml.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.core.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.editor.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.layout.editor.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.layout.fixed.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.layout.list.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.layout.plain.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.layout.table.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/8638ad407c5ea29f6547cf8ac6983da587354889/master.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/b7ab87e6269b4fe89f9475b7a260077391d3567b/jquery.syntax.layout.editor.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/b7ab87e6269b4fe89f9475b7a260077391d3567b/jquery.syntax.layout.fixed.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/b7ab87e6269b4fe89f9475b7a260077391d3567b/jquery.syntax.layout.inline.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/b7ab87e6269b4fe89f9475b7a260077391d3567b/jquery.syntax.layout.plain.sassc +0 -0
- data/documentation/public/_components/jquery-syntax/.sass-cache/e82f8cf4c8436da086a4506e01ef78755ebab1ce/master.scssc +0 -0
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.apache.css +6 -0
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.applescript.css +5 -0
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.assembly.css +8 -0
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.bash-script.css +6 -0
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.bash.css +10 -0
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.clang.css +3 -0
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.css.css +14 -0
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.diff.css +16 -0
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.html.css +5 -0
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.ocaml.css +3 -0
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.protobuf.css +2 -0
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.python.css +6 -0
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.ruby.css +2 -0
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.xml.css +18 -0
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.core.css +59 -0
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.editor.css +6 -0
- data/documentation/public/_components/jquery-syntax/base/theme.js +1 -0
- data/documentation/public/_components/jquery-syntax/bright/jquery.syntax.core.css +27 -0
- data/documentation/public/_components/jquery-syntax/bright/theme.js +1 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.apache.js +41 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.applescript.js +57 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.assembly.js +37 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.bash-script.js +67 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.bash.js +33 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.basic.js +51 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.clang.js +89 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.csharp.js +47 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.css.js +80 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.diff.js +24 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.go.js +47 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.haskell.js +45 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.html.js +66 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.io.js +45 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.java.js +45 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.javascript.js +40 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.kai.js +29 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.lisp.js +34 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.lua.js +44 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.nginx.js +31 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.ocaml.js +73 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.ooc.js +46 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.pascal.js +51 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.perl5.js +52 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.php-script.js +48 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.php.js +15 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.plain.js +10 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.protobuf.js +43 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.python.js +44 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.ruby.js +77 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.scala.js +44 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.smalltalk.js +29 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.sql.js +31 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.super-collider.js +57 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.swift.js +55 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.trenni.js +35 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.xml.js +50 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.yaml.js +29 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.cache.js +65 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.core.js +1098 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.editor.js +291 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.js +258 -0
- data/documentation/public/_components/jquery-syntax/jquery.syntax.min.js +13 -0
- data/documentation/public/_components/jquery-syntax/paper/jquery.syntax.core.css +31 -0
- data/documentation/public/_components/jquery-syntax/paper/theme.js +1 -0
- data/documentation/public/_static +1 -0
- data/documentation/tasks +1 -0
- data/lib/utopia/command.rb +1 -1
- data/lib/utopia/controller/actions.rb +1 -2
- data/lib/utopia/controller/respond.rb +1 -1
- data/lib/utopia/version.rb +1 -1
- data/setup/site/.bowerrc +2 -2
- data/setup/site/config.ru +1 -1
- data/setup/site/public/_static/site.css +16 -1
- data/setup/site/tasks/bower.rake +48 -0
- metadata +114 -5
- data/documentation/public +0 -1
- data/documentation/tasks/test.rake +0 -10
- data/documentation/tasks/utopia.rake +0 -38
@@ -0,0 +1,14 @@
|
|
1
|
+
.syntax-theme-base .css .selector {
|
2
|
+
color: #458;
|
3
|
+
font-weight: bold; }
|
4
|
+
.syntax-theme-base .css .property {
|
5
|
+
color: teal; }
|
6
|
+
.syntax-theme-base .css .color-box {
|
7
|
+
position: relative; }
|
8
|
+
.syntax-theme-base .css .color-box .sample {
|
9
|
+
border: 1px solid #000;
|
10
|
+
position: absolute;
|
11
|
+
left: 0.2em;
|
12
|
+
right: 0.2em;
|
13
|
+
top: 0.2em;
|
14
|
+
bottom: 0.2em; }
|
@@ -0,0 +1,16 @@
|
|
1
|
+
.syntax-theme-base .syntax .add {
|
2
|
+
color: green; }
|
3
|
+
.syntax-theme-base .syntax .del {
|
4
|
+
color: red; }
|
5
|
+
.syntax-theme-base .syntax .insert {
|
6
|
+
color: green; }
|
7
|
+
.syntax-theme-base .syntax .insert-line {
|
8
|
+
background-color: #cfc !important; }
|
9
|
+
.syntax-theme-base .syntax .remove {
|
10
|
+
color: red; }
|
11
|
+
.syntax-theme-base .syntax .remove-line {
|
12
|
+
background-color: #fcc !important; }
|
13
|
+
.syntax-theme-base .syntax .offset {
|
14
|
+
color: blue; }
|
15
|
+
.syntax-theme-base .syntax .offset-line {
|
16
|
+
background-color: #ccf !important; }
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.syntax-theme-base .xml .cdata-content {
|
2
|
+
color: #046;
|
3
|
+
border-radius: 0.5em; }
|
4
|
+
.syntax-theme-base .xml .xml-tag, .syntax-theme-base .xml .cdata {
|
5
|
+
color: #00c; }
|
6
|
+
.syntax-theme-base .xml .tag-name, .syntax-theme-base .xml .cdata-tag {
|
7
|
+
color: #00f;
|
8
|
+
font-weight: bold; }
|
9
|
+
.syntax-theme-base .xml .namespace {
|
10
|
+
color: #00c; }
|
11
|
+
.syntax-theme-base .xml .attribute {
|
12
|
+
color: #00c; }
|
13
|
+
.syntax-theme-base .xml .instruction {
|
14
|
+
color: #00c; }
|
15
|
+
.syntax-theme-base .xml .entity, .syntax-theme-base .xml .percent-escape {
|
16
|
+
color: #666;
|
17
|
+
background-color: #ddd;
|
18
|
+
border-radius: 0.5em; }
|
@@ -0,0 +1,59 @@
|
|
1
|
+
pre code.syntax-theme-base {
|
2
|
+
display: block; }
|
3
|
+
pre code.syntax-theme-base > span {
|
4
|
+
display: block;
|
5
|
+
white-space: pre-wrap; }
|
6
|
+
pre code.syntax-theme-base .indent {
|
7
|
+
display: block;
|
8
|
+
float: left; }
|
9
|
+
pre code.syntax-theme-base .text {
|
10
|
+
white-space: pre-wrap;
|
11
|
+
display: block;
|
12
|
+
overflow: hidden;
|
13
|
+
padding-left: 1rem;
|
14
|
+
text-indent: -1rem; }
|
15
|
+
|
16
|
+
.syntax-theme-base {
|
17
|
+
font-family: Menlo, Monaco, Consolas, monospace;
|
18
|
+
line-height: 1.15em; }
|
19
|
+
.syntax-theme-base .function {
|
20
|
+
color: #33f; }
|
21
|
+
.syntax-theme-base .keyword, .syntax-theme-base .access {
|
22
|
+
color: #7a0968; }
|
23
|
+
.syntax-theme-base .type {
|
24
|
+
color: #3239D6; }
|
25
|
+
.syntax-theme-base .comment {
|
26
|
+
color: #6ac; }
|
27
|
+
.syntax-theme-base .constant {
|
28
|
+
color: #1c00ce; }
|
29
|
+
.syntax-theme-base .string, .syntax-theme-base .symbol {
|
30
|
+
color: #c41a15; }
|
31
|
+
.syntax-theme-base .string .escape {
|
32
|
+
color: #f99; }
|
33
|
+
.syntax-theme-base .operator {
|
34
|
+
color: #000000; }
|
35
|
+
.syntax-theme-base .href {
|
36
|
+
color: #0e0eff;
|
37
|
+
text-decoration: underline; }
|
38
|
+
.syntax-theme-base .variable {
|
39
|
+
color: #466997; }
|
40
|
+
.syntax-theme-base .highlight {
|
41
|
+
background-color: #fdfdba; }
|
42
|
+
.syntax-theme-base pre {
|
43
|
+
overflow: auto;
|
44
|
+
font-family: inherit; }
|
45
|
+
|
46
|
+
.syntax-container.syntax-theme-base {
|
47
|
+
position: relative; }
|
48
|
+
.syntax-container.syntax-theme-base .toolbar {
|
49
|
+
font-size: 80%;
|
50
|
+
text-align: right;
|
51
|
+
padding: 0 0.2em 0.2em; }
|
52
|
+
.syntax-container.syntax-theme-base .toolbar a {
|
53
|
+
margin-left: 1em; }
|
54
|
+
.syntax-container.syntax-theme-base pre.raw {
|
55
|
+
overflow: auto;
|
56
|
+
padding: 0 0.4em 0 !important;
|
57
|
+
margin: 0 !important;
|
58
|
+
background-color: #f0f0f0;
|
59
|
+
border: 1px solid #aaa; }
|
@@ -0,0 +1 @@
|
|
1
|
+
Syntax.themes["base"] = []
|
@@ -0,0 +1,27 @@
|
|
1
|
+
.syntax-container.syntax-theme-bright .syntax {
|
2
|
+
font-family: Menlo, Monaco, Consolas, monospace;
|
3
|
+
line-height: 1.5em; }
|
4
|
+
.syntax-container.syntax-theme-bright .syntax .function {
|
5
|
+
color: #33f; }
|
6
|
+
.syntax-container.syntax-theme-bright .syntax .keyword {
|
7
|
+
color: #3c3; }
|
8
|
+
.syntax-container.syntax-theme-bright .syntax .access {
|
9
|
+
color: #ffb600;
|
10
|
+
font-weight: bold; }
|
11
|
+
.syntax-container.syntax-theme-bright .syntax .type {
|
12
|
+
color: #191;
|
13
|
+
font-weight: bold; }
|
14
|
+
.syntax-container.syntax-theme-bright .syntax .comment {
|
15
|
+
color: #6ac;
|
16
|
+
font-style: italic; }
|
17
|
+
.syntax-container.syntax-theme-bright .syntax .string, .syntax-container.syntax-theme-bright .syntax .constant {
|
18
|
+
color: #f33; }
|
19
|
+
.syntax-container.syntax-theme-bright .syntax .string .escape {
|
20
|
+
color: #f99; }
|
21
|
+
.syntax-container.syntax-theme-bright .syntax .operator {
|
22
|
+
color: #c00; }
|
23
|
+
.syntax-container.syntax-theme-bright .syntax .href {
|
24
|
+
color: #00f;
|
25
|
+
text-decoration: underline; }
|
26
|
+
.syntax-container.syntax-theme-bright .syntax .variable {
|
27
|
+
color: #22c; }
|
@@ -0,0 +1 @@
|
|
1
|
+
Syntax.themes["bright"] = ["base"]
|
@@ -0,0 +1,41 @@
|
|
1
|
+
// brush: "apache" 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('apache', function(brush) {
|
8
|
+
brush.push({
|
9
|
+
pattern: /(<(\w+).*?>)/gi,
|
10
|
+
matches: Syntax.extractMatches(
|
11
|
+
{
|
12
|
+
klass: 'tag',
|
13
|
+
allow: ['attribute', 'tag-name', 'string']
|
14
|
+
},
|
15
|
+
{
|
16
|
+
klass: 'tag-name',
|
17
|
+
process: Syntax.lib.webLinkProcess("site:http://httpd.apache.org/docs/trunk/ directive", true)
|
18
|
+
})
|
19
|
+
});
|
20
|
+
|
21
|
+
brush.push({
|
22
|
+
pattern: /(<\/(\w+).*?>)/gi,
|
23
|
+
matches: Syntax.extractMatches({klass: 'tag', allow: ['tag-name']}, {klass: 'tag-name'})
|
24
|
+
});
|
25
|
+
|
26
|
+
brush.push({
|
27
|
+
pattern: /^\s+([A-Z][\w]+)/gm,
|
28
|
+
matches: Syntax.extractMatches({
|
29
|
+
klass: 'function',
|
30
|
+
allow: ['attribute'],
|
31
|
+
process: Syntax.lib.webLinkProcess("site:http://httpd.apache.org/docs/trunk/ directive", true)
|
32
|
+
})
|
33
|
+
});
|
34
|
+
|
35
|
+
brush.push(Syntax.lib.perlStyleComment);
|
36
|
+
brush.push(Syntax.lib.singleQuotedString);
|
37
|
+
brush.push(Syntax.lib.doubleQuotedString);
|
38
|
+
|
39
|
+
brush.push(Syntax.lib.webLink);
|
40
|
+
});
|
41
|
+
|
@@ -0,0 +1,57 @@
|
|
1
|
+
// brush: "applescript" 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('applescript', function(brush) {
|
8
|
+
var keywords = ["after", "before", "beginning", "continue", "copy", "each", "end", "every", "from", "get", "global", "in", "local", "named", "of", "return", "set", "some", "that", "the", "then", "times", "to", "where", "whose", "with", "without"]
|
9
|
+
|
10
|
+
brush.push(keywords, {klass: 'keyword'});
|
11
|
+
|
12
|
+
var ordinals = ["first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth", "last", "front", "back", "middle"];
|
13
|
+
|
14
|
+
brush.push(ordinals, {klass: 'keyword'});
|
15
|
+
|
16
|
+
var specials = ["activate", "add", "alias", "AppleScript", "ask", "attachment", "boolean", "class", "constant", "delete", "duplicate", "empty", "exists", "false", "id", "integer", "list", "make", "message", "modal", "modified", "new", "no", "paragraph", "pi", "properties", "quit", "real", "record", "remove", "rest", "result", "reveal", "reverse", "run", "running", "save", "string", "true", "word", "yes"];
|
17
|
+
|
18
|
+
brush.push(specials, {klass: 'keyword'});
|
19
|
+
|
20
|
+
var comments = [
|
21
|
+
/(\-\-|#).*$/gm,
|
22
|
+
/\(\*(?:[\s\S]*?\(\*[\s\S]*?\*\))*[\s\S]*?\*\)/gm,
|
23
|
+
Syntax.lib.perlStyleComment.pattern
|
24
|
+
];
|
25
|
+
|
26
|
+
brush.push(Syntax.lib.webLink);
|
27
|
+
brush.push(comments, {klass: 'comment', allow: ['href']});
|
28
|
+
|
29
|
+
brush.push(Syntax.lib.doubleQuotedString);
|
30
|
+
|
31
|
+
var constants = [
|
32
|
+
/\b\d+(st|nd|rd|th)\b/g,
|
33
|
+
/(-)?(\d)+(\.(\d)?)?(E\+(\d)+)?/g
|
34
|
+
];
|
35
|
+
|
36
|
+
brush.push(constants, {klass: 'constant'});
|
37
|
+
|
38
|
+
brush.push({
|
39
|
+
pattern: /&|¬|=|≠|>|<|≥|>=|≤|<=|\*|\+|-|\/|÷|\^/g,
|
40
|
+
klass: 'operator'
|
41
|
+
});
|
42
|
+
|
43
|
+
brush.push({
|
44
|
+
pattern: /\b(?:and|as|div|mod|not|or|return(?!\s&)(ing)?|equals|(is(n't| not)? )?equal( to)?|does(n't| not) equal|(is(n't| not)? )?(greater|less) than( or equal( to)?)?|(comes|does(n't| not) come) (after|before)|is(n't| not)?( in)? (back|front) of|is(n't| not)? behind|is(n't| not)?( (in|contained by))?|does(n't| not) contain|contain(s)?|(start|begin|end)(s)? with|((but|end) )?(consider|ignor)ing|prop(erty)?|(a )?ref(erence)?( to)?|repeat (until|while|with)|((end|exit) )?repeat|((else|end) )?if|else|(end )?(script|tell|try)|(on )?error|(put )?into|(of )?(it|me)|its|my|with (timeout( of)?|transaction)|end (timeout|transaction))\b/g,
|
45
|
+
klass: 'keyword'
|
46
|
+
})
|
47
|
+
|
48
|
+
brush.push({
|
49
|
+
pattern: /\b(?:about|above|against|around|at|below|beneath|beside|between|by|(apart|aside) from|(instead|out) of|into|on(to)?|over|since|thr(ough|u)|under)\b/g,
|
50
|
+
klass: 'keyword'
|
51
|
+
})
|
52
|
+
|
53
|
+
brush.push({
|
54
|
+
pattern: /\b(?:adding folder items to|after receiving|choose( ((remote )?application|color|folder|from list|URL))?|clipboard info|set the clipboard to|(the )?clipboard|entire contents|display(ing| (alert|dialog|mode))?|document( (edited|file|nib name))?|file( (name|type))?|(info )?for|giving up after|(name )?extension|quoted form|return(ed)?|second(?! item)(s)?|list (disks|folder)|text item(s| delimiters)?|(Unicode )?text|(disk )?item(s)?|((current|list) )?view|((container|key) )?window|with (data|icon( (caution|note|stop))?|parameter(s)?|prompt|properties|seed|title)|case|diacriticals|hyphens|numeric strings|punctuation|white space|folder creation|application(s( folder)?| (processes|scripts position|support))?|((desktop )?(pictures )?|(documents|downloads|favorites|home|keychain|library|movies|music|public|scripts|sites|system|users|utilities|workflows) )folder|desktop|Folder Action scripts|font(s| panel)?|help|internet plugins|modem scripts|(system )?preferences|printer descriptions|scripting (additions|components)|shared (documents|libraries)|startup (disk|items)|temporary items|trash|on server|in AppleTalk zone|((as|long|short) )?user name|user (ID|locale)|(with )?password|in (bundle( with identifier)?|directory)|(close|open for) access|read|write( permission)?|(g|s)et eof|using( delimiters)?|starting at|default (answer|button|color|country code|entr(y|ies)|identifiers|items|name|location|script editor)|hidden( answer)?|open(ed| (location|untitled))?|error (handling|reporting)|(do( shell)?|load|run|store) script|administrator privileges|altering line endings|get volume settings|(alert|boot|input|mount|output|set) volume|output muted|(fax|random )?number|round(ing)?|up|down|toward zero|to nearest|as taught in school|system (attribute|info)|((AppleScript( Studio)?|system) )?version|(home )?directory|(IPv4|primary Ethernet) address|CPU (type|speed)|physical memory|time (stamp|to GMT)|replacing|ASCII (character|number)|localized string|from table|offset|summarize|beep|delay|say|(empty|multiple) selections allowed|(of|preferred) type|invisibles|showing( package contents)?|editable URL|(File|FTP|News|Media|Web) [Ss]ervers|Telnet hosts|Directory services|Remote applications|waiting until completion|saving( (in|to))?|path (for|to( (((current|frontmost) )?application|resource))?)|POSIX (file|path)|(background|RGB) color|(OK|cancel) button name|cancel button|button(s)?|cubic ((centi)?met(re|er)s|yards|feet|inches)|square ((kilo)?met(re|er)s|miles|yards|feet)|(centi|kilo)?met(re|er)s|miles|yards|feet|inches|lit(re|er)s|gallons|quarts|(kilo)?grams|ounces|pounds|degrees (Celsius|Fahrenheit|Kelvin)|print( (dialog|settings))?|clos(e(able)?|ing)|(de)?miniaturized|miniaturizable|zoom(ed|able)|attribute run|action (method|property|title)|phone|email|((start|end)ing|home) page|((birth|creation|current|custom|modification) )?date|((((phonetic )?(first|last|middle))|computer|host|maiden|related) |nick)?name|aim|icq|jabber|msn|yahoo|address(es)?|save addressbook|should enable action|city|country( code)?|formatte(r|d address)|(palette )?label|state|street|zip|AIM [Hh]andle(s)?|my card|select(ion| all)?|unsaved|(alpha )?value|entr(y|ies)|group|(ICQ|Jabber|MSN) handle|person|people|company|department|icon image|job title|note|organization|suffix|vcard|url|copies|collating|pages (across|down)|request print time|target( printer)?|((GUI Scripting|Script menu) )?enabled|show Computer scripts|(de)?activated|awake from nib|became (key|main)|call method|of (class|object)|center|clicked toolbar item|closed|for document|exposed|(can )?hide|idle|keyboard (down|up)|event( (number|type))?|launch(ed)?|load (image|movie|nib|sound)|owner|log|mouse (down|dragged|entered|exited|moved|up)|move|column|localization|resource|script|register|drag (info|types)|resigned (active|key|main)|resiz(e(d)?|able)|right mouse (down|dragged|up)|scroll wheel|(at )?index|should (close|open( untitled)?|quit( after last window closed)?|zoom)|((proposed|screen) )?bounds|show(n)?|behind|in front of|size (mode|to fit)|update(d| toolbar item)?|was (hidden|miniaturized)|will (become active|close|finish launching|hide|miniaturize|move|open|quit|(resign )?active|((maximum|minimum|proposed) )?size|show|zoom)|bundle|data source|movie|pasteboard|sound|tool(bar| tip)|(color|open|save) panel|coordinate system|frontmost|main( (bundle|menu|window))?|((services|(excluded from )?windows) )?menu|((executable|frameworks|resource|scripts|shared (frameworks|support)) )?path|(selected item )?identifier|data|content(s| view)?|character(s)?|click count|(command|control|option|shift) key down|context|delta (x|y|z)|key( code)?|location|pressure|unmodified characters|types|(first )?responder|playing|(allowed|selectable) identifiers|allows customization|(auto saves )?configuration|visible|image( name)?|menu form representation|tag|user(-| )defaults|associated file name|(auto|needs) display|current field editor|floating|has (resize indicator|shadow)|hides when deactivated|level|minimized (image|title)|opaque|position|release when closed|sheet|title(d)?)\b/g,
|
55
|
+
klass: 'keyword'
|
56
|
+
})
|
57
|
+
});
|
@@ -0,0 +1,37 @@
|
|
1
|
+
// brush: "assembly" aliases: ["asm"]
|
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('assembly', function(brush) {
|
8
|
+
brush.push(Syntax.lib.cStyleComment);
|
9
|
+
brush.push(Syntax.lib.cppStyleComment);
|
10
|
+
|
11
|
+
brush.push({pattern: /\.[a-zA-Z_][a-zA-Z0-9_]*/gm, klass: 'directive'});
|
12
|
+
|
13
|
+
brush.push({pattern: /^[a-zA-Z_][a-zA-Z0-9_]*:/gm, klass: 'label'});
|
14
|
+
|
15
|
+
brush.push({
|
16
|
+
pattern: /^\s*([a-zA-Z]+)/gm,
|
17
|
+
matches: Syntax.extractMatches({klass: 'function'})
|
18
|
+
});
|
19
|
+
|
20
|
+
brush.push({pattern: /(-[0-9]+)|(\b[0-9]+)|(\$[0-9]+)/g, klass: 'constant'});
|
21
|
+
brush.push({pattern: /(\-|\b|\$)(0x[0-9a-f]+|[0-9]+|[a-z0-9_]+)/gi, klass: 'constant'});
|
22
|
+
|
23
|
+
brush.push({pattern: /%\w+/g, klass: 'register'});
|
24
|
+
|
25
|
+
// Strings
|
26
|
+
brush.push(Syntax.lib.singleQuotedString);
|
27
|
+
brush.push(Syntax.lib.doubleQuotedString);
|
28
|
+
brush.push(Syntax.lib.stringEscape);
|
29
|
+
|
30
|
+
// Numbers
|
31
|
+
brush.push(Syntax.lib.decimalNumber);
|
32
|
+
brush.push(Syntax.lib.hexNumber);
|
33
|
+
|
34
|
+
// Comments
|
35
|
+
brush.push(Syntax.lib.perlStyleComment);
|
36
|
+
brush.push(Syntax.lib.webLink);
|
37
|
+
});
|
@@ -0,0 +1,67 @@
|
|
1
|
+
// brush: "bash-script" 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('bash-script', function(brush) {
|
8
|
+
var operators = ["&&", "|", ";", "{", "}"];
|
9
|
+
brush.push(operators, {klass: 'operator'});
|
10
|
+
|
11
|
+
brush.push({
|
12
|
+
pattern: /(?:^|\||;|&&)\s*((?:"([^"]|\\")+"|'([^']|\\')+'|\\\n|.|[ \t])+?)(?=$|\||;|&&)/gmi,
|
13
|
+
matches: Syntax.extractMatches({brush: 'bash-statement'})
|
14
|
+
});
|
15
|
+
});
|
16
|
+
|
17
|
+
Syntax.register('bash-statement', function(brush) {
|
18
|
+
var keywords = ["break", "case", "continue", "do", "done", "elif", "else", "eq", "fi", "for", "function", "ge", "gt", "if", "in", "le", "lt", "ne", "return", "then", "until", "while"];
|
19
|
+
brush.push(keywords, {klass: 'keyword'});
|
20
|
+
|
21
|
+
var operators = [">", "<", "=", "`", "--", "{", "}", "(", ")", "[", "]"];
|
22
|
+
brush.push(operators, {klass: 'operator'});
|
23
|
+
|
24
|
+
brush.push({
|
25
|
+
pattern: /\(\((.*?)\)\)/gmi,
|
26
|
+
klass: 'expression',
|
27
|
+
allow: ['variable', 'string', 'operator', 'constant']
|
28
|
+
});
|
29
|
+
|
30
|
+
brush.push({
|
31
|
+
pattern: /`([\s\S]+?)`/gmi,
|
32
|
+
matches: Syntax.extractMatches({brush: 'bash-script', debug: true})
|
33
|
+
});
|
34
|
+
|
35
|
+
brush.push(Syntax.lib.perlStyleComment);
|
36
|
+
|
37
|
+
// Probably need to write a real parser here rather than using regular expressions, it is too fragile
|
38
|
+
// and misses lots of edge cases (e.g. nested brackets, delimiters).
|
39
|
+
brush.push({
|
40
|
+
pattern: /^\s*((?:\S+?=\$?(?:\[[^\]]+\]|\(\(.*?\)\)|"(?:[^"]|\\")+"|'(?:[^']|\\')+'|\S+)\s*)*)((?:(\\ |\S)+)?)/gmi,
|
41
|
+
matches: Syntax.extractMatches(
|
42
|
+
{klass: 'env', allow: ['variable', 'string', 'operator', 'constant', 'expression']},
|
43
|
+
{klass: 'function', allow: ['variable', 'string']}
|
44
|
+
)
|
45
|
+
});
|
46
|
+
|
47
|
+
brush.push({
|
48
|
+
pattern: /(\S+?)=/gmi,
|
49
|
+
matches: Syntax.extractMatches({klass: 'variable'}),
|
50
|
+
only: ['env']
|
51
|
+
});
|
52
|
+
|
53
|
+
brush.push({
|
54
|
+
pattern: /\$\w+/g,
|
55
|
+
klass: 'variable'
|
56
|
+
});
|
57
|
+
|
58
|
+
brush.push({pattern: /\s\-+\w+/g, klass: 'option'})
|
59
|
+
|
60
|
+
brush.push(Syntax.lib.singleQuotedString);
|
61
|
+
brush.push(Syntax.lib.doubleQuotedString);
|
62
|
+
|
63
|
+
brush.push(Syntax.lib.decimalNumber);
|
64
|
+
brush.push(Syntax.lib.hexNumber);
|
65
|
+
|
66
|
+
brush.push(Syntax.lib.webLink);
|
67
|
+
});
|
@@ -0,0 +1,33 @@
|
|
1
|
+
// brush: "bash" 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.brushes.dependency('bash', 'bash-script');
|
8
|
+
|
9
|
+
Syntax.register('bash', function(brush) {
|
10
|
+
brush.push({
|
11
|
+
pattern: /^([\w@:~ ]*?[\$|\#])\s+(.*?)$/gm,
|
12
|
+
matches: Syntax.extractMatches({klass: 'prompt'}, {brush: 'bash-script'})
|
13
|
+
});
|
14
|
+
|
15
|
+
brush.push({
|
16
|
+
pattern: /^\-\- .*$/gm,
|
17
|
+
klass: 'comment',
|
18
|
+
allow: ['href']
|
19
|
+
});
|
20
|
+
|
21
|
+
// Strings
|
22
|
+
brush.push(Syntax.lib.singleQuotedString);
|
23
|
+
brush.push(Syntax.lib.doubleQuotedString);
|
24
|
+
brush.push(Syntax.lib.stringEscape);
|
25
|
+
|
26
|
+
// Numbers
|
27
|
+
brush.push(Syntax.lib.webLink);
|
28
|
+
|
29
|
+
brush.push({
|
30
|
+
klass: 'stderr',
|
31
|
+
allow: ['string', 'comment', 'constant', 'href']
|
32
|
+
});
|
33
|
+
});
|
@@ -0,0 +1,51 @@
|
|
1
|
+
// brush: "basic" aliases: ['vb']
|
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.lib.vbStyleComment = {pattern: /' .*$/gm, klass: 'comment', allow: ['href']};
|
8
|
+
|
9
|
+
Syntax.register('basic', function(brush) {
|
10
|
+
var keywords = ["AddHandler", "AddressOf", "Alias", "And", "AndAlso", "Ansi", "As", "Assembly", "Auto", "ByRef", "ByVal", "Call", "Case", "Catch", "Declare", "Default", "Delegate", "Dim", "DirectCast", "Do", "Each", "Else", "ElseIf", "End", "Enum", "Erase", "Error", "Event", "Exit", "Finally", "For", "Function", "Get", "GetType", "GoSub", "GoTo", "Handles", "If", "Implements", "Imports", "In", "Inherits", "Interface", "Is", "Let", "Lib", "Like", "Loop", "Mod", "Module", "MustOverride", "Namespace", "New", "Next", "Not", "On", "Option", "Optional", "Or", "OrElse", "Overloads", "Overridable", "Overrides", "ParamArray", "Preserve", "Property", "RaiseEvent", "ReadOnly", "ReDim", "REM", "RemoveHandler", "Resume", "Return", "Select", "Set", "Static", "Step", "Stop", "Structure", "Sub", "SyncLock", "Then", "Throw", "To", "Try", "TypeOf", "Unicode", "Until", "When", "While", "With", "WithEvents", "WriteOnly", "Xor", "ExternalSource", "Region", "Print", "Class"];
|
11
|
+
|
12
|
+
var operators = ["-", "&", "&=", "*", "*=", "/", "/=", "\\", "\=", "^", "^=", "+", "+=", "=", "-="];
|
13
|
+
|
14
|
+
var types = ["CBool", "CByte", "CChar", "CDate", "CDec", "CDbl", "Char", "CInt", "CLng", "CObj", "Const", "CShort", "CSng", "CStr", "CType", "Date", "Decimal", "Variant", "String", "Short", "Long", "Single", "Double", "Object", "Integer", "Boolean", "Byte", "Char"];
|
15
|
+
|
16
|
+
var operators = ["+", "-", "*", "/", "+=", "-=", "*=", "/=", "=", ":=", "==", "!=", "!", "%", "?", ">", "<", ">=", "<=", "&&", "||", "&", "|", "^", ".", "~", "..", ">>", "<<", ">>>", "<<<", ">>=", "<<=", ">>>=", "<<<=", "%=", "^=", "@"];
|
17
|
+
|
18
|
+
var values = ["Me", "MyClass", "MyBase", "super", "True", "False", "Nothing", /[A-Z][A-Z0-9_]+/g];
|
19
|
+
|
20
|
+
var access = ["Public", "Protected", "Private", "Shared", "Friend", "Shadows", "MustInherit", "NotInheritable", "NotOverridable"];
|
21
|
+
|
22
|
+
brush.push(types, {klass: 'type'});
|
23
|
+
brush.push(keywords, {klass: 'keyword', options: 'gi'});
|
24
|
+
brush.push(operators, {klass: 'operator'});
|
25
|
+
brush.push(access, {klass: 'access'});
|
26
|
+
brush.push(values, {klass: 'constant'});
|
27
|
+
|
28
|
+
brush.push(Syntax.lib.decimalNumber);
|
29
|
+
|
30
|
+
// ClassNames (CamelCase)
|
31
|
+
brush.push(Syntax.lib.camelCaseType);
|
32
|
+
|
33
|
+
brush.push(Syntax.lib.vbStyleComment);
|
34
|
+
|
35
|
+
brush.push(Syntax.lib.webLink);
|
36
|
+
|
37
|
+
// Strings
|
38
|
+
brush.push(Syntax.lib.doubleQuotedString);
|
39
|
+
brush.push(Syntax.lib.stringEscape);
|
40
|
+
|
41
|
+
brush.postprocess = function (options, html, container) {
|
42
|
+
var queryURI = "http://social.msdn.microsoft.com/Search/en-us?query=";
|
43
|
+
|
44
|
+
jQuery('.function', html).each(function() {
|
45
|
+
var text = jQuery(this).text();
|
46
|
+
jQuery(this).replaceWith(jQuery('<a>').attr('href', queryURI + encodeURIComponent(text)).text(text));
|
47
|
+
});
|
48
|
+
|
49
|
+
return html;
|
50
|
+
};
|
51
|
+
});
|
@@ -0,0 +1,89 @@
|
|
1
|
+
// brush: "clang" aliases: ["cpp", "c++", "c", "objective-c"]
|
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('clang', function(brush) {
|
8
|
+
var keywords = ["@interface", "@implementation", "@protocol", "@end", "@try", "@throw", "@catch", "@finally", "@class", "@selector", "@encode", "@synchronized", "@property", "@synthesize", "@dynamic", "struct", "break", "continue", "else", "for", "switch", "case", "default", "enum", "goto", "register", "sizeof", "typedef", "volatile", "do", "extern", "if", "return", "static", "union", "while", "asm", "dynamic_cast", "namespace", "reinterpret_cast", "try", "explicit", "static_cast", "typeid", "catch", "operator", "template", "class", "const_cast", "inline", "throw", "virtual", "IBOutlet"];
|
9
|
+
|
10
|
+
var access = ["@private", "@protected", "@public", "@required", "@optional", "private", "protected", "public", "friend", "using"];
|
11
|
+
|
12
|
+
var typeModifiers = ["mutable", "auto", "const", "register", "typename", "abstract"];
|
13
|
+
var types = ["double", "float", "int", "short", "char", "long", "signed", "unsigned", "bool", "void", "id"];
|
14
|
+
|
15
|
+
var operators = ["+", "*", "/", "-", "&", "|", "~", "!", "%", "<", "=", ">", "[", "]", "new", "delete", "in"];
|
16
|
+
|
17
|
+
var values = ["this", "true", "false", "NULL", "YES", "NO", "nil"];
|
18
|
+
|
19
|
+
brush.push(values, {klass: 'constant'});
|
20
|
+
brush.push(typeModifiers, {klass: 'keyword'})
|
21
|
+
brush.push(types, {klass: 'type'});
|
22
|
+
brush.push(keywords, {klass: 'keyword'});
|
23
|
+
brush.push(operators, {klass: 'operator'});
|
24
|
+
brush.push(access, {klass: 'access'});
|
25
|
+
|
26
|
+
// Objective-C properties
|
27
|
+
brush.push({
|
28
|
+
pattern: /@property\((.*)\)[^;]+;/gmi,
|
29
|
+
klass: 'objective-c-property',
|
30
|
+
allow: '*'
|
31
|
+
});
|
32
|
+
|
33
|
+
var propertyAttributes = ["getter", "setter", "readwrite", "readonly", "assign", "retain", "copy", "nonatomic"];
|
34
|
+
|
35
|
+
brush.push(propertyAttributes, {
|
36
|
+
klass: 'keyword',
|
37
|
+
only: ['objective-c-property']
|
38
|
+
});
|
39
|
+
|
40
|
+
// Objective-C strings
|
41
|
+
|
42
|
+
brush.push({
|
43
|
+
pattern: /@(?=")/g,
|
44
|
+
klass: 'string'
|
45
|
+
});
|
46
|
+
|
47
|
+
// Objective-C classes, C++ classes, C types, etc.
|
48
|
+
brush.push(Syntax.lib.camelCaseType);
|
49
|
+
brush.push(Syntax.lib.cStyleType);
|
50
|
+
brush.push({
|
51
|
+
pattern: /(?:class|struct|enum|namespace)\s+([^{;\s]+)/gmi,
|
52
|
+
matches: Syntax.extractMatches({klass: 'type'})
|
53
|
+
});
|
54
|
+
|
55
|
+
brush.push({
|
56
|
+
pattern: /#.*$/gmi,
|
57
|
+
klass: 'preprocessor',
|
58
|
+
allow: ['string']
|
59
|
+
});
|
60
|
+
|
61
|
+
brush.push(Syntax.lib.cStyleComment);
|
62
|
+
brush.push(Syntax.lib.cppStyleComment);
|
63
|
+
brush.push(Syntax.lib.webLink);
|
64
|
+
|
65
|
+
// Objective-C style functions
|
66
|
+
brush.push({pattern: /\w+:(?=.*(\]|;|\{))(?!:)/g, klass: 'function'});
|
67
|
+
|
68
|
+
brush.push({
|
69
|
+
pattern: /[^:\[]\s+(\w+)(?=\])/g,
|
70
|
+
matches: Syntax.extractMatches({klass: 'function'})
|
71
|
+
});
|
72
|
+
|
73
|
+
brush.push({
|
74
|
+
pattern: /-\s*(\([^\)]+?\))?\s*(\w+)\s*\{/g,
|
75
|
+
matches: Syntax.extractMatches({index: 2, klass: 'function'})
|
76
|
+
});
|
77
|
+
|
78
|
+
// Strings
|
79
|
+
brush.push(Syntax.lib.singleQuotedString);
|
80
|
+
brush.push(Syntax.lib.doubleQuotedString);
|
81
|
+
brush.push(Syntax.lib.stringEscape);
|
82
|
+
|
83
|
+
// Numbers
|
84
|
+
brush.push(Syntax.lib.decimalNumber);
|
85
|
+
brush.push(Syntax.lib.hexNumber);
|
86
|
+
|
87
|
+
brush.push(Syntax.lib.cStyleFunction);
|
88
|
+
});
|
89
|
+
|
@@ -0,0 +1,47 @@
|
|
1
|
+
// brush: "csharp" aliases: ["c-sharp", "c#"]
|
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('csharp', function(brush) {
|
8
|
+
var keywords = ["abstract", "add", "alias", "ascending", "base", "break", "case", "catch", "class", "const", "continue", "default", "delegate", "descending", "do", "dynamic", "else", "enum", "event", "explicit", "extern", "finally", "for", "foreach", "from", "get", "global", "goto", "group", "if", "implicit", "in", "interface", "into", "join", "let", "lock", "namespace", "new", "operator", "orderby", "out", "override", "params", "partial", "readonly", "ref", "remove", "return", "sealed", "select", "set", "stackalloc", "static", "struct", "switch", "throw", "try", "unsafe", "using", "value", "var", "virtual", "volatile", "where", "while", "yield"];
|
9
|
+
|
10
|
+
var access = ["public", "private", "internal", "protected"];
|
11
|
+
|
12
|
+
var types = ["object", "bool", "byte", "fixed", "float", "uint", "char", "ulong", "ushort", "decimal", "int", "sbyte", "short", "void", "long", "string", "double"];
|
13
|
+
|
14
|
+
var operators = ["+", "-", "*", "/", "%", "&", "|", "^", "!", "~", "&&", "||", "++", "--", "<<", ">>", "==", "!=", "<", ">", "<=", ">=", "=", "?", "new", "as", "is", "sizeof", "typeof", "checked", "unchecked"];
|
15
|
+
|
16
|
+
var values = ["this", "true", "false", "null"];
|
17
|
+
|
18
|
+
brush.push(values, {klass: 'constant'});
|
19
|
+
brush.push(types, {klass: 'type'});
|
20
|
+
brush.push(keywords, {klass: 'keyword'});
|
21
|
+
brush.push(operators, {klass: 'operator'});
|
22
|
+
brush.push(access, {klass: 'access'});
|
23
|
+
|
24
|
+
// Functions
|
25
|
+
brush.push(Syntax.lib.cStyleFunction);
|
26
|
+
brush.push({
|
27
|
+
pattern: /(?:\.)([a-z_][a-z0-9_]+)/gi,
|
28
|
+
matches: Syntax.extractMatches({klass: 'function'})
|
29
|
+
});
|
30
|
+
|
31
|
+
// Camel Case Types
|
32
|
+
brush.push(Syntax.lib.camelCaseType);
|
33
|
+
|
34
|
+
// Comments
|
35
|
+
brush.push(Syntax.lib.cStyleComment);
|
36
|
+
brush.push(Syntax.lib.cppStyleComment);
|
37
|
+
brush.push(Syntax.lib.webLink);
|
38
|
+
|
39
|
+
// Strings
|
40
|
+
brush.push(Syntax.lib.singleQuotedString);
|
41
|
+
brush.push(Syntax.lib.doubleQuotedString);
|
42
|
+
brush.push(Syntax.lib.stringEscape);
|
43
|
+
|
44
|
+
brush.push(Syntax.lib.decimalNumber);
|
45
|
+
brush.push(Syntax.lib.hexNumber);
|
46
|
+
});
|
47
|
+
|