├── lib
├── c.js
└── a.js
├── thumbnail.png
├── assets
├── css
│ ├── base.css
│ └── custom.css
└── vendor
│ ├── bootstrap
│ ├── img
│ │ ├── glyphicons-halflings.png
│ │ └── glyphicons-halflings-white.png
│ └── css
│ │ ├── bootstrap-responsive.min.css
│ │ ├── bootstrap-responsive.css
│ │ └── bootstrap.min.css
│ └── sh
│ ├── highlighter.css
│ ├── sh_main.min.js
│ └── sh_javascript.js
├── files
├── layout.css
├── static.html
├── highlighter.css
└── index.html
├── Makefile
├── manifest.json
├── models
└── tiger.js
├── index.js
├── README.md
├── scripts
├── teardown.js
└── setup.js
├── LICENSE
└── app.js
/lib/c.js:
--------------------------------------------------------------------------------
1 | exports.longText = "This is a longer Text";
--------------------------------------------------------------------------------
/thumbnail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arangodb-foxx/demo-hello-foxx/HEAD/thumbnail.png
--------------------------------------------------------------------------------
/assets/css/base.css:
--------------------------------------------------------------------------------
1 | /* this is defined in assets/css/base.css */
2 | .example {
3 | margin-bottom: 30px;
4 | }
--------------------------------------------------------------------------------
/assets/css/custom.css:
--------------------------------------------------------------------------------
1 | /* this is defined in assets/css/custom.css */
2 | .somethingelse {
3 | color: lawngreen;
4 | }
--------------------------------------------------------------------------------
/lib/a.js:
--------------------------------------------------------------------------------
1 | var c = require("../lib/c");
2 |
3 | exports.text = "This text is set in lib/a.js";
4 | exports.longText = c.longText;
5 |
--------------------------------------------------------------------------------
/assets/vendor/bootstrap/img/glyphicons-halflings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arangodb-foxx/demo-hello-foxx/HEAD/assets/vendor/bootstrap/img/glyphicons-halflings.png
--------------------------------------------------------------------------------
/assets/vendor/bootstrap/img/glyphicons-halflings-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arangodb-foxx/demo-hello-foxx/HEAD/assets/vendor/bootstrap/img/glyphicons-halflings-white.png
--------------------------------------------------------------------------------
/files/layout.css:
--------------------------------------------------------------------------------
1 | /* this is defined in assets/css/base.css */
2 | .example {
3 | margin-bottom: 30px;
4 | }/* this is defined in assets/css/custom.css */
5 | .somethingelse {
6 | color: lawngreen;
7 | }
--------------------------------------------------------------------------------
/files/static.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ArangoDB can deliver static files
5 |
6 |
7 |
8 |
9 |
This is a static html file, located in files/static.html.
10 |
It is accessible as a static file because it is in the folder "files" and this folder is configured in the "files" section of manifest.js.
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | all: \
2 | files/scripts.js \
3 | files/layout.css \
4 | files/highlighter.css \
5 | files/bootstrap.css
6 |
7 | files/scripts.js: assets/vendor/jquery/jquery.js assets/vendor/sh/sh_main.min.js assets/vendor/sh/sh_javascript.js
8 | cat $^ > $@
9 |
10 | files/layout.css: assets/css/base.css assets/css/custom.css
11 | cat $^ > $@
12 |
13 | files/highlighter.css: assets/vendor/sh/highlighter.css
14 | cat $^ > $@
15 |
16 | files/bootstrap.css: assets/vendor/bootstrap/css/bootstrap.min.css assets/vendor/bootstrap/css/bootstrap-responsive.min.css
17 | cat $^ > $@
18 |
--------------------------------------------------------------------------------
/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hello-foxx",
3 | "version": "2.0.0",
4 | "description": "This is 'Hello World' for ArangoDB Foxx.",
5 | "author": "Frank Celler",
6 | "thumbnail": "thumbnail.png",
7 |
8 | "engines": {
9 | "arangodb": "^3.0.0"
10 | },
11 |
12 | "main": "index.js",
13 | "defaultDocument": "index.html",
14 |
15 | "contributors": [
16 | { "name": "luebbert42" },
17 | { "name": "Alan Plum" }
18 | ],
19 |
20 | "scripts": {
21 | "setup": "scripts/setup.js",
22 | "teardown": "scripts/teardown.js"
23 | },
24 |
25 | "files": {
26 | "/": "files"
27 | },
28 |
29 | "lib": "."
30 | }
31 |
--------------------------------------------------------------------------------
/models/tiger.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const _ = require('lodash');
4 | const joi = require('joi');
5 |
6 | exports.Tiger = function (data) {
7 | this.name = data.name;
8 | this.size = null;
9 | this.typeOfCat = "A tiger";
10 | this.sound = "Rrrrrrrr";
11 |
12 | this.growl = function() {
13 | return this.sound;
14 | };
15 | };
16 |
17 | exports.Model = {
18 | schema: joi.object({
19 | name: joi.string().required(),
20 | size: joi.number().optional(),
21 | typeOfCat: joi.string().required(),
22 | sound: joi.string().required()
23 | }).required(),
24 |
25 | forClient (data) {
26 | return _.omit(data, ['_key', '_id', '_rev']);
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | /*jslint indent: 2, nomen: true, maxlen: 100, white: true, plusplus: true, unparam: true */
2 | /*global require, applicationContext*/
3 | 'use strict';
4 |
5 | ////////////////////////////////////////////////////////////////////////////////
6 | /// @brief A Demo Foxx-Application written for ArangoDB
7 | ///
8 | /// @file
9 | ///
10 | /// DISCLAIMER
11 | ///
12 | /// Copyright 2016 ArangoDB GmbH, Cologne, Germany
13 | ///
14 | /// Licensed under the Apache License, Version 2.0 (the "License");
15 | /// you may not use this file except in compliance with the License.
16 | /// You may obtain a copy of the License at
17 | ///
18 | /// http://www.apache.org/licenses/LICENSE-2.0
19 | ///
20 | /// Unless required by applicable law or agreed to in writing, software
21 | /// distributed under the License is distributed on an "AS IS" BASIS,
22 | /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | /// See the License for the specific language governing permissions and
24 | /// limitations under the License.
25 | ///
26 | /// Copyright holder is ArangoDB GmbH, Cologne, Germany
27 | ///
28 | /// @author Frank Celler
29 | /// @author Copyright 2016, ArangoDB GmbH, Cologne, Germany
30 | ////////////////////////////////////////////////////////////////////////////////
31 |
32 | module.context.use('/', require('./app.js'));
33 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | An ArangoDB Foxx Demo Application
2 | ================================
3 |
4 | Foxx is an easy way to create APIs and simple web applications from
5 | within ArangoDB. It is inspired by Sinatra, the classy Ruby web
6 | framework.
7 |
8 | "hello-foxx" is the hello world example for Foxx. Its
9 | [description file](https://github.com/triAGENS/foxx-apps/blob/master/applications/hello-foxx.json)
10 | can be found in the applications folder.
11 |
12 | {
13 | "description": "This is 'Hello World' for ArangoDB Foxx.",
14 | "author": "Frank Celler",
15 |
16 | "versions": {
17 | "1.2.0" : { "type": "github", "location": "fceller/hello-foxx", "tag": "v1.2.0" }
18 | }
19 | }
20 |
21 | The description file is a JSON document with the attributes:
22 |
23 | * *description*: a short description of the application
24 | * *author*: the name of the author, an email address, or a twitter handle
25 | * *versions*: a list of available versions
26 |
27 | In order to install this application into your local ArangoDB
28 | installation, you can use the foxx-manager like this
29 |
30 | foxx-manager install hello-foxx /hello
31 |
32 | This will download the application into your local installation of
33 | ArangoDB (which must be up and running) and mount it under the path
34 | "/hello".
35 |
36 | If you now visit
37 |
38 | http://localhost:8529/hello
39 |
40 | you should see a nice fox.
41 |
--------------------------------------------------------------------------------
/scripts/teardown.js:
--------------------------------------------------------------------------------
1 | /*jslint indent: 2, nomen: true, maxlen: 100, white: true, plusplus: true, unparam: true */
2 | /*global require, applicationContext*/
3 | 'use strict';
4 |
5 | ////////////////////////////////////////////////////////////////////////////////
6 | /// @brief A Demo Foxx-Application written for ArangoDB
7 | ///
8 | /// @file
9 | ///
10 | /// DISCLAIMER
11 | ///
12 | /// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany
13 | /// Copyright 2010-2013 triagens GmbH, Cologne, Germany
14 | ///
15 | /// Licensed under the Apache License, Version 2.0 (the "License");
16 | /// you may not use this file except in compliance with the License.
17 | /// You may obtain a copy of the License at
18 | ///
19 | /// http://www.apache.org/licenses/LICENSE-2.0
20 | ///
21 | /// Unless required by applicable law or agreed to in writing, software
22 | /// distributed under the License is distributed on an "AS IS" BASIS,
23 | /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24 | /// See the License for the specific language governing permissions and
25 | /// limitations under the License.
26 | ///
27 | /// Copyright holder is triAGENS GmbH, Cologne, Germany
28 | ///
29 | /// @author Frank Celler
30 | /// @author Copyright 2014-2016, ArangoDB GmbH, Cologne, Germany
31 | /// @author Copyright 2011-2013, triAGENS GmbH, Cologne, Germany
32 | ////////////////////////////////////////////////////////////////////////////////
33 |
34 | const arangodb = require("@arangodb");
35 |
36 | const db = arangodb.db;
37 | const texts = module.context.collectionName('texts');
38 |
39 | const collection = db._collection(texts);
40 |
41 | if (collection !== null) {
42 | collection.drop();
43 | }
44 |
--------------------------------------------------------------------------------
/files/highlighter.css:
--------------------------------------------------------------------------------
1 | pre.sh_sourceCode{background-color:#000;color:#fff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_keyword{color:#c0c000;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_type{color:#00c000;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_string{color:#0ff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_regexp{color:#0ff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_specialchar{color:#00f;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_comment{color:#808080;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_number{color:#0ff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_preproc{color:#0f0;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_symbol{color:#f00;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_function{color:#ff22b9;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_cbracket{color:#f00;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_url{color:#0ff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_date{color:#c0c000;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_time{color:#c0c000;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_file{color:#c0c000;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_ip{color:#0ff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_name{color:#0ff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_variable{color:#0000c0;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_oldfile{color:#00f;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_newfile{color:#0ff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_difflines{color:#c0c000;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_selector{color:#0000c0;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_property{color:#c0c000;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_value{color:#0ff;font-weight:normal;font-style:normal;}
--------------------------------------------------------------------------------
/assets/vendor/sh/highlighter.css:
--------------------------------------------------------------------------------
1 | pre.sh_sourceCode{background-color:#000;color:#fff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_keyword{color:#c0c000;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_type{color:#00c000;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_string{color:#0ff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_regexp{color:#0ff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_specialchar{color:#00f;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_comment{color:#808080;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_number{color:#0ff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_preproc{color:#0f0;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_symbol{color:#f00;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_function{color:#ff22b9;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_cbracket{color:#f00;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_url{color:#0ff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_date{color:#c0c000;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_time{color:#c0c000;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_file{color:#c0c000;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_ip{color:#0ff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_name{color:#0ff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_variable{color:#0000c0;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_oldfile{color:#00f;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_newfile{color:#0ff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_difflines{color:#c0c000;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_selector{color:#0000c0;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_property{color:#c0c000;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_value{color:#0ff;font-weight:normal;font-style:normal;}
--------------------------------------------------------------------------------
/scripts/setup.js:
--------------------------------------------------------------------------------
1 | /*jslint indent: 2, nomen: true, maxlen: 100, white: true, plusplus: true, unparam: true */
2 | /*global require, applicationContext*/
3 | 'use strict';
4 |
5 | ////////////////////////////////////////////////////////////////////////////////
6 | /// @brief A Demo Foxx-Application written for ArangoDB
7 | ///
8 | /// @file
9 | ///
10 | /// DISCLAIMER
11 | ///
12 | /// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany
13 | /// Copyright 2010-2013 triagens GmbH, Cologne, Germany
14 | ///
15 | /// Licensed under the Apache License, Version 2.0 (the "License");
16 | /// you may not use this file except in compliance with the License.
17 | /// You may obtain a copy of the License at
18 | ///
19 | /// http://www.apache.org/licenses/LICENSE-2.0
20 | ///
21 | /// Unless required by applicable law or agreed to in writing, software
22 | /// distributed under the License is distributed on an "AS IS" BASIS,
23 | /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24 | /// See the License for the specific language governing permissions and
25 | /// limitations under the License.
26 | ///
27 | /// Copyright holder is triAGENS GmbH, Cologne, Germany
28 | ///
29 | /// @author Dr. Frank Celler
30 | /// @author Copyright 2014-2016, ArangoDB GmbH, Cologne, Germany
31 | /// @author Copyright 2011-2013, triAGENS GmbH, Cologne, Germany
32 | ////////////////////////////////////////////////////////////////////////////////
33 |
34 | const arangodb = require("@arangodb");
35 |
36 | const db = arangodb.db;
37 | const texts = module.context.collectionName('texts');
38 |
39 | if (db._collection(texts) === null) {
40 | var collection = db._create(texts);
41 |
42 | collection.save({ text: "entry 1 from collection texts" });
43 | collection.save({ text: "entry 2 from collection texts" });
44 | collection.save({ text: "entry 3 from collection texts" });
45 | }
46 | else {
47 | console.log("collection '%s' already exists. Leaving it untouched.", texts);
48 | }
49 |
--------------------------------------------------------------------------------
/files/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | An ArangoDB Foxx Demo Application
5 |
6 |
7 |
8 |
9 |
10 |
11 |
51 |
52 |
53 |
54 |
55 |
56 |
Foxx usage examples
57 |
58 |
59 |
60 |
Click on the example name to see it in action.
61 |
62 |
63 |
64 |
65 | /\
66 | (~(
67 | ) ) /\_/\
68 | ( _-----_(@ @)
69 | ( \ /
70 | /|/--\|\ V
71 | " " " "
72 | May the Foxx be with you.
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/assets/vendor/sh/sh_main.min.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2007, 2008 gnombat@users.sourceforge.net */
2 | /* License: http://shjs.sourceforge.net/doc/gplv3.html */
3 |
4 | if(!this.sh_languages){this.sh_languages={}}var sh_requests={};function sh_isEmailAddress(a){if(/^mailto:/.test(a)){return false}return a.indexOf("@")!==-1}function sh_setHref(b,c,d){var a=d.substring(b[c-2].pos,b[c-1].pos);if(a.length>=2&&a.charAt(0)==="<"&&a.charAt(a.length-1)===">"){a=a.substr(1,a.length-2)}if(sh_isEmailAddress(a)){a="mailto:"+a}b[c-2].node.href=a}function sh_konquerorExec(b){var a=[""];a.index=b.length;a.input=b;return a}function sh_highlightString(B,o){if(/Konqueror/.test(navigator.userAgent)){if(!o.konquered){for(var F=0;FI){x(g.substring(I,E.index),null)}var e=O[u];var J=e[1];var b;if(J instanceof Array){for(var L=0;L0){var e=b.split(" ");for(var c=0;c0){a.push(e[c])}}}return a}function sh_addClass(c,a){var d=sh_getClasses(c);for(var b=0;b element with class="'+h+'", but no such language exists'}}break}}}};
--------------------------------------------------------------------------------
/assets/vendor/sh/sh_javascript.js:
--------------------------------------------------------------------------------
1 | if (! this.sh_languages) {
2 | this.sh_languages = {};
3 | }
4 | sh_languages['javascript'] = [
5 | [
6 | [
7 | /\/\/\//g,
8 | 'sh_comment',
9 | 1
10 | ],
11 | [
12 | /\/\//g,
13 | 'sh_comment',
14 | 7
15 | ],
16 | [
17 | /\/\*\*/g,
18 | 'sh_comment',
19 | 8
20 | ],
21 | [
22 | /\/\*/g,
23 | 'sh_comment',
24 | 9
25 | ],
26 | [
27 | /\b(?:abstract|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|final|finally|for|function|goto|if|implements|in|instanceof|interface|native|new|null|private|protected|prototype|public|return|static|super|switch|synchronized|throw|throws|this|transient|true|try|typeof|var|volatile|while|with)\b/g,
28 | 'sh_keyword',
29 | -1
30 | ],
31 | [
32 | /(\+\+|--|\)|\])(\s*)(\/=?(?![*\/]))/g,
33 | ['sh_symbol', 'sh_normal', 'sh_symbol'],
34 | -1
35 | ],
36 | [
37 | /(0x[A-Fa-f0-9]+|(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?)(\s*)(\/(?![*\/]))/g,
38 | ['sh_number', 'sh_normal', 'sh_symbol'],
39 | -1
40 | ],
41 | [
42 | /([A-Za-z$_][A-Za-z0-9$_]*\s*)(\/=?(?![*\/]))/g,
43 | ['sh_normal', 'sh_symbol'],
44 | -1
45 | ],
46 | [
47 | /\/(?:\\.|[^*\\\/])(?:\\.|[^\\\/])*\/[gim]*/g,
48 | 'sh_regexp',
49 | -1
50 | ],
51 | [
52 | /\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,
53 | 'sh_number',
54 | -1
55 | ],
56 | [
57 | /"/g,
58 | 'sh_string',
59 | 10
60 | ],
61 | [
62 | /'/g,
63 | 'sh_string',
64 | 11
65 | ],
66 | [
67 | /~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,
68 | 'sh_symbol',
69 | -1
70 | ],
71 | [
72 | /\{|\}/g,
73 | 'sh_cbracket',
74 | -1
75 | ],
76 | [
77 | /\b(?:Math|Infinity|NaN|undefined|arguments)\b/g,
78 | 'sh_predef_var',
79 | -1
80 | ],
81 | [
82 | /\b(?:Array|Boolean|Date|Error|EvalError|Function|Number|Object|RangeError|ReferenceError|RegExp|String|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt)\b/g,
83 | 'sh_predef_func',
84 | -1
85 | ],
86 | [
87 | /(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,
88 | 'sh_function',
89 | -1
90 | ]
91 | ],
92 | [
93 | [
94 | /$/g,
95 | null,
96 | -2
97 | ],
98 | [
99 | /(?:)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,
100 | 'sh_url',
101 | -1
102 | ],
103 | [
104 | /<\?xml/g,
105 | 'sh_preproc',
106 | 2,
107 | 1
108 | ],
109 | [
110 | //g,
122 | 'sh_keyword',
123 | -1
124 | ],
125 | [
126 | /<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,
127 | 'sh_keyword',
128 | 6,
129 | 1
130 | ],
131 | [
132 | /&(?:[A-Za-z0-9]+);/g,
133 | 'sh_preproc',
134 | -1
135 | ],
136 | [
137 | /<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,
138 | 'sh_keyword',
139 | -1
140 | ],
141 | [
142 | /<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,
143 | 'sh_keyword',
144 | 6,
145 | 1
146 | ],
147 | [
148 | /@[A-Za-z]+/g,
149 | 'sh_type',
150 | -1
151 | ],
152 | [
153 | /(?:TODO|FIXME|BUG)(?:[:]?)/g,
154 | 'sh_todo',
155 | -1
156 | ]
157 | ],
158 | [
159 | [
160 | /\?>/g,
161 | 'sh_preproc',
162 | -2
163 | ],
164 | [
165 | /([^=" \t>]+)([ \t]*)(=?)/g,
166 | ['sh_type', 'sh_normal', 'sh_symbol'],
167 | -1
168 | ],
169 | [
170 | /"/g,
171 | 'sh_string',
172 | 3
173 | ]
174 | ],
175 | [
176 | [
177 | /\\(?:\\|")/g,
178 | null,
179 | -1
180 | ],
181 | [
182 | /"/g,
183 | 'sh_string',
184 | -2
185 | ]
186 | ],
187 | [
188 | [
189 | />/g,
190 | 'sh_preproc',
191 | -2
192 | ],
193 | [
194 | /([^=" \t>]+)([ \t]*)(=?)/g,
195 | ['sh_type', 'sh_normal', 'sh_symbol'],
196 | -1
197 | ],
198 | [
199 | /"/g,
200 | 'sh_string',
201 | 3
202 | ]
203 | ],
204 | [
205 | [
206 | /-->/g,
207 | 'sh_comment',
208 | -2
209 | ],
210 | [
211 | /