liquid_cms 0.3.0.1 → 0.3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +5 -1
- data/Gemfile.lock +1 -1
- data/README.rdoc +5 -1
- data/app/helpers/cms/common_helper.rb +1 -0
- data/app/views/cms/pages/_page.html.erb +2 -1
- data/app/views/layouts/cms.html.erb +2 -1
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/LICENSE +2 -2
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/css/csscolors.css +12 -8
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/css/docs.css +123 -29
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/csstest.html +1 -1
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/htmltest.html +1 -1
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/index.html +232 -179
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/codemirror.js +211 -65
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/editor.js +360 -194
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/mirrorframe.js +1 -1
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/parsecss.js +11 -7
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/parsejavascript.js +14 -5
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/parsesparql.js +1 -1
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/select.js +140 -87
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/stringstream.js +5 -0
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/tokenizejavascript.js +1 -1
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/undo.js +7 -7
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/manual.html +148 -52
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/story.html +631 -614
- data/lib/generators/liquid_cms/templates/public/cms/stylesheets/styles.css +7 -7
- data/lib/liquid_cms/version.rb +1 -1
- metadata +4 -26
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/lua/LICENSE +0 -32
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/lua/css/luacolors.css +0 -63
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/lua/index.html +0 -68
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/lua/js/parselua.js +0 -253
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/LICENSE +0 -37
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/css/phpcolors.css +0 -114
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/index.html +0 -292
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/js/parsephp.js +0 -371
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/js/parsephphtmlmixed.js +0 -90
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/js/tokenizephp.js +0 -1006
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/plsql/LICENSE +0 -22
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/plsql/css/plsqlcolors.css +0 -57
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/plsql/index.html +0 -67
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/plsql/js/parseplsql.js +0 -233
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/python/LICENSE +0 -32
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/python/css/pythoncolors.css +0 -58
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/python/index.html +0 -141
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/python/js/parsepython.js +0 -542
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/sql/LICENSE +0 -22
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/sql/css/sqlcolors.css +0 -57
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/sql/index.html +0 -56
- data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/sql/js/parsesql.js +0 -211
@@ -76,12 +76,6 @@ a img {
|
|
76
76
|
margin: 0;
|
77
77
|
padding: 0;
|
78
78
|
}
|
79
|
-
#sidebar ul.tree, #sidebar #assets ul {
|
80
|
-
margin-bottom: 1em;
|
81
|
-
}
|
82
|
-
#sidebar ul.tree ul {
|
83
|
-
margin-left: 15px;
|
84
|
-
}
|
85
79
|
#sidebar #assets li {
|
86
80
|
border: 1px solid #AAA;
|
87
81
|
padding: 0.3em 0.4em;
|
@@ -135,6 +129,13 @@ h2 p.message {
|
|
135
129
|
#cms ul.tree li { margin: 0; padding: 0 12px; line-height: 20px; background: url(/cms/images/tree/node.png) no-repeat; color: #369; font-weight: bold; }
|
136
130
|
#cms ul.tree li:last-child { background: url(/cms/images/tree/lastnode.png) no-repeat; }
|
137
131
|
|
132
|
+
#cms ul.tree, #sidebar #assets ul {
|
133
|
+
margin-bottom: 1em;
|
134
|
+
}
|
135
|
+
#cms ul.tree ul {
|
136
|
+
margin-left: 15px;
|
137
|
+
}
|
138
|
+
|
138
139
|
.left {
|
139
140
|
float: left;
|
140
141
|
}
|
@@ -145,5 +146,4 @@ h2 p.message {
|
|
145
146
|
.CodeMirror-wrapping iframe {
|
146
147
|
background-color: white;
|
147
148
|
border: 1px solid #BBBBBB !important;
|
148
|
-
width: 89% !important;
|
149
149
|
}
|
data/lib/liquid_cms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liquid_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 83
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
9
|
- 0
|
10
|
-
-
|
11
|
-
version: 0.3.0.
|
10
|
+
- 2
|
11
|
+
version: 0.3.0.2
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Andrew Kaspick
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-10-
|
20
|
+
date: 2010-10-28 00:00:00 -05:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
@@ -258,28 +258,6 @@ files:
|
|
258
258
|
- lib/generators/liquid_cms/templates/migration.rb
|
259
259
|
- lib/generators/liquid_cms/templates/public/cms/codemirror/LICENSE
|
260
260
|
- lib/generators/liquid_cms/templates/public/cms/codemirror/bigtest.html
|
261
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/lua/LICENSE
|
262
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/lua/css/luacolors.css
|
263
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/lua/index.html
|
264
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/lua/js/parselua.js
|
265
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/LICENSE
|
266
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/css/phpcolors.css
|
267
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/index.html
|
268
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/js/parsephp.js
|
269
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/js/parsephphtmlmixed.js
|
270
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/js/tokenizephp.js
|
271
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/plsql/LICENSE
|
272
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/plsql/css/plsqlcolors.css
|
273
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/plsql/index.html
|
274
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/plsql/js/parseplsql.js
|
275
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/python/LICENSE
|
276
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/python/css/pythoncolors.css
|
277
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/python/index.html
|
278
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/python/js/parsepython.js
|
279
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/sql/LICENSE
|
280
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/sql/css/sqlcolors.css
|
281
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/sql/index.html
|
282
|
-
- lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/sql/js/parsesql.js
|
283
261
|
- lib/generators/liquid_cms/templates/public/cms/codemirror/css/csscolors.css
|
284
262
|
- lib/generators/liquid_cms/templates/public/cms/codemirror/css/docs.css
|
285
263
|
- lib/generators/liquid_cms/templates/public/cms/codemirror/css/jscolors.css
|
@@ -1,32 +0,0 @@
|
|
1
|
-
Copyright (c) 2009, Franciszek Wawrzak
|
2
|
-
All rights reserved.
|
3
|
-
|
4
|
-
This software is provided for use in connection with the
|
5
|
-
CodeMirror suite of modules and utilities, hosted and maintained
|
6
|
-
at http://marijn.haverbeke.nl/codemirror/.
|
7
|
-
|
8
|
-
Redistribution and use of this software in source and binary forms,
|
9
|
-
with or without modification, are permitted provided that the
|
10
|
-
following conditions are met:
|
11
|
-
|
12
|
-
* Redistributions of source code must retain the above
|
13
|
-
copyright notice, this list of conditions and the
|
14
|
-
following disclaimer.
|
15
|
-
|
16
|
-
* Redistributions in binary form must reproduce the above
|
17
|
-
copyright notice, this list of conditions and the
|
18
|
-
following disclaimer in the documentation and/or other
|
19
|
-
materials provided with the distribution.
|
20
|
-
|
21
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
22
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
23
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
24
|
-
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
25
|
-
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
26
|
-
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
27
|
-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
28
|
-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
29
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
30
|
-
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
31
|
-
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32
|
-
POSSIBILITY OF SUCH DAMAGE.
|
data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/lua/css/luacolors.css
DELETED
@@ -1,63 +0,0 @@
|
|
1
|
-
html {
|
2
|
-
cursor: text;
|
3
|
-
}
|
4
|
-
|
5
|
-
.editbox {
|
6
|
-
margin: .4em;
|
7
|
-
padding: 0;
|
8
|
-
font-family: monospace;
|
9
|
-
font-size: 10pt;
|
10
|
-
color: black;
|
11
|
-
}
|
12
|
-
|
13
|
-
pre.code, .editbox {
|
14
|
-
color: #666666;
|
15
|
-
}
|
16
|
-
|
17
|
-
.editbox p {
|
18
|
-
margin: 0;
|
19
|
-
}
|
20
|
-
|
21
|
-
span.lua-comment {
|
22
|
-
color: #BB9977;
|
23
|
-
}
|
24
|
-
|
25
|
-
span.lua-keyword {
|
26
|
-
font-weight: bold;
|
27
|
-
color: blue;
|
28
|
-
}
|
29
|
-
|
30
|
-
span.lua-string {
|
31
|
-
color: #AA2222;
|
32
|
-
}
|
33
|
-
|
34
|
-
span.lua-stdfunc {
|
35
|
-
font-weight: bold;
|
36
|
-
color: #077;
|
37
|
-
}
|
38
|
-
span.lua-customfunc {
|
39
|
-
font-weight: bold;
|
40
|
-
color: #0AA;
|
41
|
-
}
|
42
|
-
|
43
|
-
|
44
|
-
span.lua-identifier {
|
45
|
-
color: black;
|
46
|
-
}
|
47
|
-
|
48
|
-
span.lua-number {
|
49
|
-
color: #3A3;
|
50
|
-
}
|
51
|
-
|
52
|
-
span.lua-token {
|
53
|
-
color: #151;
|
54
|
-
}
|
55
|
-
|
56
|
-
span.lua-error {
|
57
|
-
color: #FFF;
|
58
|
-
background-color: #F00;
|
59
|
-
}
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
@@ -1,68 +0,0 @@
|
|
1
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
2
|
-
<head>
|
3
|
-
<script src="../../js/codemirror.js" type="text/javascript"></script>
|
4
|
-
<title>CodeMirror: Lua demonstration</title>
|
5
|
-
</head>
|
6
|
-
<body style="padding: 20px;">
|
7
|
-
|
8
|
-
<p>This page demonstrates <a href="../../index.html">CodeMirror</a>'s
|
9
|
-
Lua parser. Written by <a href="http://francio.pl/">Franciszek
|
10
|
-
Wawrzak</a>, released under a BSD-style <a
|
11
|
-
href="LICENSE">license</a>.</p>
|
12
|
-
|
13
|
-
<div style="border: 1px solid black; padding: 0px;">
|
14
|
-
<textarea id="code" cols="120" rows="30">
|
15
|
-
--[[
|
16
|
-
example useless code to show lua syntax highlighting
|
17
|
-
this is multiline comment
|
18
|
-
]]
|
19
|
-
|
20
|
-
function blahblahblah(x)
|
21
|
-
|
22
|
-
local table = {
|
23
|
-
"asd" = 123,
|
24
|
-
"x" = 0.34,
|
25
|
-
}
|
26
|
-
if x ~= 3 then
|
27
|
-
print( x )
|
28
|
-
elseif x == "string"
|
29
|
-
my_custom_function( 0x34 )
|
30
|
-
else
|
31
|
-
unknown_function( "some string" )
|
32
|
-
end
|
33
|
-
|
34
|
-
--single line comment
|
35
|
-
|
36
|
-
end
|
37
|
-
|
38
|
-
function blablabla3()
|
39
|
-
|
40
|
-
for k,v in ipairs( table ) do
|
41
|
-
--abcde..
|
42
|
-
y=[=[
|
43
|
-
x=[[
|
44
|
-
x is a multi line string
|
45
|
-
]]
|
46
|
-
but its definition is iside a highest level string!
|
47
|
-
]=]
|
48
|
-
print(" \"\" ")
|
49
|
-
--this marks a parser error:
|
50
|
-
s = [== asdasdasd]]
|
51
|
-
|
52
|
-
s = math.sin( x )
|
53
|
-
end
|
54
|
-
|
55
|
-
end
|
56
|
-
</textarea>
|
57
|
-
</div>
|
58
|
-
|
59
|
-
<script type="text/javascript">
|
60
|
-
var editor = CodeMirror.fromTextArea('code', {
|
61
|
-
height: "350px",
|
62
|
-
parserfile: "../contrib/lua/js/parselua.js",
|
63
|
-
stylesheet: "css/luacolors.css",
|
64
|
-
path: "../../js/"
|
65
|
-
});
|
66
|
-
</script>
|
67
|
-
</body>
|
68
|
-
</html>
|
@@ -1,253 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Simple parser for LUA
|
3
|
-
Written for Lua 5.1, based on parsecss and other parsers.
|
4
|
-
features: highlights keywords, strings, comments (no leveling supported! ("[==[")),tokens, basic indenting
|
5
|
-
|
6
|
-
to make this parser highlight your special functions pass table with this functions names to parserConfig argument of creator,
|
7
|
-
|
8
|
-
parserConfig: ["myfunction1","myfunction2"],
|
9
|
-
*/
|
10
|
-
|
11
|
-
|
12
|
-
function findFirstRegexp(words) {
|
13
|
-
return new RegExp("^(?:" + words.join("|") + ")", "i");
|
14
|
-
}
|
15
|
-
|
16
|
-
function matchRegexp(words) {
|
17
|
-
return new RegExp("^(?:" + words.join("|") + ")$", "i");
|
18
|
-
}
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
var luaCustomFunctions= matchRegexp([]);
|
23
|
-
|
24
|
-
function configureLUA(parserConfig){
|
25
|
-
if(parserConfig)
|
26
|
-
luaCustomFunctions= matchRegexp(parserConfig);
|
27
|
-
}
|
28
|
-
|
29
|
-
|
30
|
-
//long list of standard functions from lua manual
|
31
|
-
var luaStdFunctions = matchRegexp([
|
32
|
-
"_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load","loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require","select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall",
|
33
|
-
|
34
|
-
"coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield",
|
35
|
-
|
36
|
-
"debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable","debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable","debug.setupvalue","debug.traceback",
|
37
|
-
|
38
|
-
"close","flush","lines","read","seek","setvbuf","write",
|
39
|
-
|
40
|
-
"io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin","io.stdout","io.tmpfile","io.type","io.write",
|
41
|
-
|
42
|
-
"math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg","math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max","math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh","math.sqrt","math.tan","math.tanh",
|
43
|
-
|
44
|
-
"os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale","os.time","os.tmpname",
|
45
|
-
|
46
|
-
"package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload","package.seeall",
|
47
|
-
|
48
|
-
"string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub","string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper",
|
49
|
-
|
50
|
-
"table.concat","table.insert","table.maxn","table.remove","table.sort"
|
51
|
-
]);
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
var luaKeywords = matchRegexp(["and","break","elseif","false","nil","not","or","return",
|
56
|
-
"true","function", "end", "if", "then", "else", "do",
|
57
|
-
"while", "repeat", "until", "for", "in", "local" ]);
|
58
|
-
|
59
|
-
var luaIndentKeys = matchRegexp(["function", "if","repeat","for","while", "[\(]", "{"]);
|
60
|
-
var luaUnindentKeys = matchRegexp(["end", "until", "[\)]", "}"]);
|
61
|
-
|
62
|
-
var luaUnindentKeys2 = findFirstRegexp(["end", "until", "[\)]", "}"]);
|
63
|
-
var luaMiddleKeys = findFirstRegexp(["else","elseif"]);
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
var LUAParser = Editor.Parser = (function() {
|
68
|
-
var tokenizeLUA = (function() {
|
69
|
-
function normal(source, setState) {
|
70
|
-
var ch = source.next();
|
71
|
-
|
72
|
-
if (ch == "-" && source.equals("-")) {
|
73
|
-
source.next();
|
74
|
-
setState(inSLComment);
|
75
|
-
return null;
|
76
|
-
}
|
77
|
-
else if (ch == "\"" || ch == "'") {
|
78
|
-
setState(inString(ch));
|
79
|
-
return null;
|
80
|
-
}
|
81
|
-
if (ch == "[" && (source.equals("[") || source.equals("="))) {
|
82
|
-
var level = 0;
|
83
|
-
while(source.equals("=")){
|
84
|
-
level ++;
|
85
|
-
source.next();
|
86
|
-
}
|
87
|
-
if(! source.equals("[") )
|
88
|
-
return "lua-error";
|
89
|
-
setState(inMLSomething(level,"lua-string"));
|
90
|
-
return null;
|
91
|
-
}
|
92
|
-
|
93
|
-
else if (ch == "=") {
|
94
|
-
if (source.equals("="))
|
95
|
-
source.next();
|
96
|
-
return "lua-token";
|
97
|
-
}
|
98
|
-
|
99
|
-
else if (ch == ".") {
|
100
|
-
if (source.equals("."))
|
101
|
-
source.next();
|
102
|
-
if (source.equals("."))
|
103
|
-
source.next();
|
104
|
-
return "lua-token";
|
105
|
-
}
|
106
|
-
|
107
|
-
else if (ch == "+" || ch == "-" || ch == "*" || ch == "/" || ch == "%" || ch == "^" || ch == "#" ) {
|
108
|
-
return "lua-token";
|
109
|
-
}
|
110
|
-
else if (ch == ">" || ch == "<" || ch == "(" || ch == ")" || ch == "{" || ch == "}" || ch == "[" ) {
|
111
|
-
return "lua-token";
|
112
|
-
}
|
113
|
-
else if (ch == "]" || ch == ";" || ch == ":" || ch == ",") {
|
114
|
-
return "lua-token";
|
115
|
-
}
|
116
|
-
else if (source.equals("=") && (ch == "~" || ch == "<" || ch == ">")) {
|
117
|
-
source.next();
|
118
|
-
return "lua-token";
|
119
|
-
}
|
120
|
-
|
121
|
-
else if (/\d/.test(ch)) {
|
122
|
-
source.nextWhileMatches(/[\w.%]/);
|
123
|
-
return "lua-number";
|
124
|
-
}
|
125
|
-
else {
|
126
|
-
source.nextWhileMatches(/[\w\\\-_.]/);
|
127
|
-
return "lua-identifier";
|
128
|
-
}
|
129
|
-
}
|
130
|
-
|
131
|
-
function inSLComment(source, setState) {
|
132
|
-
var start = true;
|
133
|
-
var count=0;
|
134
|
-
while (!source.endOfLine()) {
|
135
|
-
var ch = source.next();
|
136
|
-
var level = 0;
|
137
|
-
if ((ch =="[") && start)
|
138
|
-
while(source.equals("=")){
|
139
|
-
source.next();
|
140
|
-
level++;
|
141
|
-
}
|
142
|
-
if (source.equals("[")){
|
143
|
-
setState(inMLSomething(level,"lua-comment"));
|
144
|
-
return null;
|
145
|
-
}
|
146
|
-
start = false;
|
147
|
-
}
|
148
|
-
setState(normal);
|
149
|
-
return "lua-comment";
|
150
|
-
|
151
|
-
}
|
152
|
-
|
153
|
-
function inMLSomething(level,what) {
|
154
|
-
//wat sholud be "lua-string" or "lua-comment", level is the number of "=" in opening mark.
|
155
|
-
return function(source, setState){
|
156
|
-
var dashes = 0;
|
157
|
-
while (!source.endOfLine()) {
|
158
|
-
var ch = source.next();
|
159
|
-
if (dashes == level+1 && ch == "]" ) {
|
160
|
-
setState(normal);
|
161
|
-
break;
|
162
|
-
}
|
163
|
-
if (dashes == 0)
|
164
|
-
dashes = (ch == "]") ? 1:0;
|
165
|
-
else
|
166
|
-
dashes = (ch == "=") ? dashes + 1 : 0;
|
167
|
-
}
|
168
|
-
return what;
|
169
|
-
}
|
170
|
-
}
|
171
|
-
|
172
|
-
|
173
|
-
function inString(quote) {
|
174
|
-
return function(source, setState) {
|
175
|
-
var escaped = false;
|
176
|
-
while (!source.endOfLine()) {
|
177
|
-
var ch = source.next();
|
178
|
-
if (ch == quote && !escaped)
|
179
|
-
break;
|
180
|
-
escaped = !escaped && ch == "\\";
|
181
|
-
}
|
182
|
-
if (!escaped)
|
183
|
-
setState(normal);
|
184
|
-
return "lua-string";
|
185
|
-
};
|
186
|
-
}
|
187
|
-
|
188
|
-
return function(source, startState) {
|
189
|
-
return tokenizer(source, startState || normal);
|
190
|
-
};
|
191
|
-
})();
|
192
|
-
|
193
|
-
function indentLUA(indentDepth, base) {
|
194
|
-
return function(nextChars) {
|
195
|
-
|
196
|
-
var closing = (luaUnindentKeys2.test(nextChars) || luaMiddleKeys.test(nextChars));
|
197
|
-
|
198
|
-
|
199
|
-
return base + ( indentUnit * (indentDepth - (closing?1:0)) );
|
200
|
-
};
|
201
|
-
}
|
202
|
-
|
203
|
-
|
204
|
-
function parseLUA(source,basecolumn) {
|
205
|
-
basecolumn = basecolumn || 0;
|
206
|
-
|
207
|
-
var tokens = tokenizeLUA(source);
|
208
|
-
var indentDepth = 0;
|
209
|
-
|
210
|
-
var iter = {
|
211
|
-
next: function() {
|
212
|
-
var token = tokens.next(), style = token.style, content = token.content;
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
if (style == "lua-identifier" && luaKeywords.test(content)){
|
217
|
-
token.style = "lua-keyword";
|
218
|
-
}
|
219
|
-
if (style == "lua-identifier" && luaStdFunctions.test(content)){
|
220
|
-
token.style = "lua-stdfunc";
|
221
|
-
}
|
222
|
-
if (style == "lua-identifier" && luaCustomFunctions.test(content)){
|
223
|
-
token.style = "lua-customfunc";
|
224
|
-
}
|
225
|
-
|
226
|
-
if (luaIndentKeys.test(content))
|
227
|
-
indentDepth++;
|
228
|
-
else if (luaUnindentKeys.test(content))
|
229
|
-
indentDepth--;
|
230
|
-
|
231
|
-
|
232
|
-
if (content == "\n")
|
233
|
-
token.indentation = indentLUA( indentDepth, basecolumn);
|
234
|
-
|
235
|
-
return token;
|
236
|
-
},
|
237
|
-
|
238
|
-
copy: function() {
|
239
|
-
var _tokenState = tokens.state, _indentDepth = indentDepth;
|
240
|
-
return function(source) {
|
241
|
-
tokens = tokenizeLUA(source, _tokenState);
|
242
|
-
|
243
|
-
indentDepth = _indentDepth;
|
244
|
-
return iter;
|
245
|
-
};
|
246
|
-
}
|
247
|
-
};
|
248
|
-
return iter;
|
249
|
-
}
|
250
|
-
|
251
|
-
return {make: parseLUA, configure:configureLUA, electricChars: "delf})"}; //en[d] els[e] unti[l] elsei[f] // this should be taken from Keys keywords
|
252
|
-
})();
|
253
|
-
|
@@ -1,37 +0,0 @@
|
|
1
|
-
Copyright (c) 2008-2009, Yahoo! Inc.
|
2
|
-
All rights reserved.
|
3
|
-
|
4
|
-
This software is provided for use in connection with the
|
5
|
-
CodeMirror suite of modules and utilities, hosted and maintained
|
6
|
-
at http://marijn.haverbeke.nl/codemirror/.
|
7
|
-
|
8
|
-
Redistribution and use of this software in source and binary forms,
|
9
|
-
with or without modification, are permitted provided that the
|
10
|
-
following conditions are met:
|
11
|
-
|
12
|
-
* Redistributions of source code must retain the above
|
13
|
-
copyright notice, this list of conditions and the
|
14
|
-
following disclaimer.
|
15
|
-
|
16
|
-
* Redistributions in binary form must reproduce the above
|
17
|
-
copyright notice, this list of conditions and the
|
18
|
-
following disclaimer in the documentation and/or other
|
19
|
-
materials provided with the distribution.
|
20
|
-
|
21
|
-
* Neither the name of Yahoo! Inc. nor the names of its
|
22
|
-
contributors may be used to endorse or promote products
|
23
|
-
derived from this software without specific prior
|
24
|
-
written permission of Yahoo! Inc.
|
25
|
-
|
26
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
27
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
28
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
29
|
-
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
30
|
-
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
31
|
-
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
32
|
-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
33
|
-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
34
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
35
|
-
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
36
|
-
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
37
|
-
POSSIBILITY OF SUCH DAMAGE.
|
data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/css/phpcolors.css
DELETED
@@ -1,114 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Copyright (c) 2008-2009 Yahoo! Inc. All rights reserved.
|
3
|
-
The copyrights embodied in the content of this file are licensed by
|
4
|
-
Yahoo! Inc. under the BSD (revised) open source license
|
5
|
-
|
6
|
-
@author Dan Vlad Dascalescu <dandv@yahoo-inc.com>
|
7
|
-
*/
|
8
|
-
|
9
|
-
html {
|
10
|
-
cursor: text;
|
11
|
-
}
|
12
|
-
|
13
|
-
.editbox {
|
14
|
-
margin: .4em;
|
15
|
-
padding: 0;
|
16
|
-
font-family: monospace;
|
17
|
-
font-size: 10pt;
|
18
|
-
}
|
19
|
-
|
20
|
-
/*We should define specific styles for every element of the syntax.
|
21
|
-
the setting below will cause some annoying color to show through if we missed
|
22
|
-
defining a style for a token. This is also the "color" of the whitespace and
|
23
|
-
of the cursor.
|
24
|
-
*/
|
25
|
-
pre.code, .editbox {
|
26
|
-
color: red;
|
27
|
-
}
|
28
|
-
|
29
|
-
.editbox p {
|
30
|
-
margin: 0;
|
31
|
-
}
|
32
|
-
|
33
|
-
span.php-punctuation {
|
34
|
-
color: blue;
|
35
|
-
}
|
36
|
-
|
37
|
-
span.php-keyword {
|
38
|
-
color: #770088;
|
39
|
-
font-weight: bold;
|
40
|
-
}
|
41
|
-
|
42
|
-
span.php-operator {
|
43
|
-
color: blue;
|
44
|
-
}
|
45
|
-
|
46
|
-
/* __FILE__ etc.; http://php.net/manual/en/reserved.php */
|
47
|
-
span.php-compile-time-constant {
|
48
|
-
color: #776088;
|
49
|
-
font-weight: bold;
|
50
|
-
}
|
51
|
-
|
52
|
-
/* output of get_defined_constants(). Differs from http://php.net/manual/en/reserved.constants.php */
|
53
|
-
span.php-predefined-constant {
|
54
|
-
color: darkgreen;
|
55
|
-
font-weight: bold;
|
56
|
-
}
|
57
|
-
|
58
|
-
/* PHP reserved "language constructs"... echo() etc.; http://php.net/manual/en/reserved.php */
|
59
|
-
span.php-reserved-language-construct {
|
60
|
-
color: green;
|
61
|
-
font-weight: bold;
|
62
|
-
}
|
63
|
-
|
64
|
-
/* PHP built-in functions: glob(), chr() etc.; output of get_defined_functions()["internal"] */
|
65
|
-
span.php-predefined-function {
|
66
|
-
color: green;
|
67
|
-
}
|
68
|
-
|
69
|
-
/* PHP predefined classes: PDO, Exception etc.; output of get_declared_classes() and different from http://php.net/manual/en/reserved.classes.php */
|
70
|
-
span.php-predefined-class {
|
71
|
-
color: green;
|
72
|
-
}
|
73
|
-
|
74
|
-
span.php-atom {
|
75
|
-
color: #228811;
|
76
|
-
}
|
77
|
-
|
78
|
-
/* class, interface, namespace or function names, but not $variables */
|
79
|
-
span.php-t_string {
|
80
|
-
color: black;
|
81
|
-
}
|
82
|
-
|
83
|
-
span.php-variable {
|
84
|
-
color: black;
|
85
|
-
font-weight: bold;
|
86
|
-
}
|
87
|
-
|
88
|
-
|
89
|
-
span.js-localvariable {
|
90
|
-
color: #004499;
|
91
|
-
}
|
92
|
-
|
93
|
-
span.php-comment {
|
94
|
-
color: #AA7700;
|
95
|
-
font-stretch: condensed;
|
96
|
-
/* font-style: italic; This causes line height to slightly change, getting line numbers out of sync */
|
97
|
-
}
|
98
|
-
|
99
|
-
span.php-string-single-quoted {
|
100
|
-
color: #AA2222;
|
101
|
-
}
|
102
|
-
/* double quoted strings allow interpolation */
|
103
|
-
span.php-string-double-quoted {
|
104
|
-
color: #AA2222;
|
105
|
-
font-weight: bold;
|
106
|
-
}
|
107
|
-
|
108
|
-
span.syntax-error {
|
109
|
-
background-color: red;
|
110
|
-
}
|
111
|
-
|
112
|
-
span.deprecated {
|
113
|
-
font-size: smaller;
|
114
|
-
}
|