brandon-codex 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +18 -0
- data/LICENSE.txt +29 -0
- data/Manifest.txt +105 -0
- data/PostInstall.txt +5 -0
- data/README.txt +31 -0
- data/Rakefile +6 -0
- data/app_generators/codex/USAGE +5 -0
- data/app_generators/codex/codex_generator.rb +109 -0
- data/app_generators/codex/templates/Rakefile +59 -0
- data/app_generators/codex/templates/bin/build_all.rb +47 -0
- data/app_generators/codex/templates/bin/postprocess_all.rb +5 -0
- data/app_generators/codex/templates/bin/pressie.rb +10 -0
- data/app_generators/codex/templates/code/control/basic_continuation.rb +11 -0
- data/app_generators/codex/templates/code/control/cc_throw_catch.rb +59 -0
- data/app_generators/codex/templates/code/control/closure_continuation.rb +8 -0
- data/app_generators/codex/templates/code/control/closure_continuation_2.rb +12 -0
- data/app_generators/codex/templates/content/basics.textile +37 -0
- data/app_generators/codex/templates/content/building.textile +27 -0
- data/app_generators/codex/templates/content/example.textile +80 -0
- data/app_generators/codex/templates/content/including_code.textile +80 -0
- data/app_generators/codex/templates/content/including_tex.textile +31 -0
- data/app_generators/codex/templates/content/metadata.yml +4 -0
- data/app_generators/codex/templates/content/table_of_contents.textile +20 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/CSS.html +115 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/CSharp.html +134 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/CollapseCode.html +90 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Cpp.html +190 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/CrashTest.html +108 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Delphi.html +112 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/FirstLine.html +90 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Index.html +80 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Java.html +122 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/JavaScript.html +112 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/NoControls.html +89 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/NoGutter.html +89 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/PHP.html +102 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Python.html +121 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Ruby.html +131 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/SQL.html +98 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/clipboard.swf +0 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushCSharp.js +32 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushCpp.js +73 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushCss.js +52 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushDelphi.js +34 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushJScript.js +22 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushJava.js +28 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushPhp.js +60 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushPython.js +30 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushRuby.js +28 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushSql.js +42 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushVb.js +29 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushXml.js +70 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shCore.js +414 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shCore.uncompressed.js +674 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/ShowColumns.html +89 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/SmartTabs.html +88 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css +158 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Styles/TestPages.css +63 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Templates/Test.dwt +80 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/VB.html +115 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/XML.html +136 -0
- data/app_generators/codex/templates/html/all.html +0 -0
- data/app_generators/codex/templates/readme.txt +4 -0
- data/app_generators/codex/templates/ui/default/blank.gif +0 -0
- data/app_generators/codex/templates/ui/default/bodybg.gif +0 -0
- data/app_generators/codex/templates/ui/default/framing.css +23 -0
- data/app_generators/codex/templates/ui/default/iepngfix.htc +42 -0
- data/app_generators/codex/templates/ui/default/opera.css +7 -0
- data/app_generators/codex/templates/ui/default/outline.css +15 -0
- data/app_generators/codex/templates/ui/default/pretty.css +86 -0
- data/app_generators/codex/templates/ui/default/print.css +1 -0
- data/app_generators/codex/templates/ui/default/s5-core.css +9 -0
- data/app_generators/codex/templates/ui/default/slides.css +3 -0
- data/app_generators/codex/templates/ui/default/slides.js +553 -0
- data/bin/codex +17 -0
- data/codex.gemspec +30 -0
- data/config/hoe.rb +76 -0
- data/config/requirements.rb +15 -0
- data/lib/codex.rb +23 -0
- data/lib/codex/content.rb +27 -0
- data/lib/codex/pressie.rb +108 -0
- data/lib/codex/version.rb +9 -0
- data/lib/stylesheets/pressie.css +196 -0
- data/lib/stylesheets/print.css +149 -0
- data/lib/stylesheets/ruby.png +0 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/setup.rb +1585 -0
- data/tasks/deployment.rake +34 -0
- data/tasks/environment.rake +7 -0
- data/tasks/website.rake +9 -0
- data/test/test_codex.rb +11 -0
- data/test/test_codex_generator.rb +78 -0
- data/test/test_generator_helper.rb +29 -0
- data/test/test_helper.rb +3 -0
- metadata +164 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Test.dwt" codeOutsideHTMLIsLocked="false" -->
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
5
|
+
<title>dp.SyntaxHighlighter Tests</title>
|
6
|
+
<link type="text/css" rel="stylesheet" href="Styles/SyntaxHighlighter.css"></link>
|
7
|
+
<link href="Styles/TestPages.css" rel="stylesheet" type="text/css">
|
8
|
+
</head>
|
9
|
+
|
10
|
+
<body>
|
11
|
+
|
12
|
+
<h1>dp.SyntaxHighlighter 1.5.0 Tests and Samples</h1>
|
13
|
+
<p><a href="http://code.google.com/p/syntaxhighlighter/">http://code.google.com/p/syntaxhighlighter/</a></p>
|
14
|
+
|
15
|
+
<h2><!-- InstanceBeginEditable name="Title" -->SQL<!-- InstanceEndEditable --></h2>
|
16
|
+
|
17
|
+
<div class="layout">
|
18
|
+
|
19
|
+
<div class="column1">
|
20
|
+
<h3>Languages:</h3>
|
21
|
+
<ol>
|
22
|
+
<li><a href="CSharp.html">C#</a></li>
|
23
|
+
<li><a href="CSS.html">CSS</a></li>
|
24
|
+
<li><a href="Cpp.html">C++</a></li>
|
25
|
+
<li><a href="Delphi.html">Delphi</a></li>
|
26
|
+
<li><a href="Java.html">Java</a></li>
|
27
|
+
<li><a href="JavaScript.html">JavaScript</a></li>
|
28
|
+
<li><a href="PHP.html">PHP</a></li>
|
29
|
+
<li><a href="Python.html">Python</a></li>
|
30
|
+
<li><a href="Ruby.html">Ruby</a></li>
|
31
|
+
<li><a href="SQL.html">SQL</a></li>
|
32
|
+
<li><a href="VB.html">Visual Basic</a></li>
|
33
|
+
<li><a href="XML.html">XML / HTML</a></li>
|
34
|
+
</ol>
|
35
|
+
<h3>Features:</h3>
|
36
|
+
<ol>
|
37
|
+
<li><a href="SmartTabs.html">Smart tabs</a></li>
|
38
|
+
<li><a href="FirstLine.html">First line</a> </li>
|
39
|
+
<li><a href="CollapseCode.html">Expand code</a></li>
|
40
|
+
<li><a href="ShowColumns.html">Show columns</a></li>
|
41
|
+
<li><a href="NoGutter.html">No gutter</a></li>
|
42
|
+
<li><a href="NoControls.html">No controls</a></li>
|
43
|
+
</ol>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div class="column2">
|
47
|
+
Text body before.
|
48
|
+
<hr/>
|
49
|
+
<!-- InstanceBeginEditable name="Code" -->
|
50
|
+
<pre name="code" class="sql">
|
51
|
+
SELECT TOP 10
|
52
|
+
FirstName,
|
53
|
+
LastName,
|
54
|
+
Email,
|
55
|
+
--SUBSTRING(Phone, 2, 3) AS CityCode,
|
56
|
+
SUBSTRING(Phone, 7, 8) AS PhoneNumber,
|
57
|
+
upper(LanguagePref) AS Language,
|
58
|
+
Address1,
|
59
|
+
UpdatedOn AS CreatedOn
|
60
|
+
FROM
|
61
|
+
profiles
|
62
|
+
WHERE
|
63
|
+
-- Exclude all test emails
|
64
|
+
Email NOT LIKE '%test%'
|
65
|
+
AND Email NOT LIKE '%asdf%'
|
66
|
+
ORDER BY
|
67
|
+
UpdatedOn DESC
|
68
|
+
</pre>
|
69
|
+
<!-- InstanceEndEditable -->
|
70
|
+
<hr/>
|
71
|
+
Text body after.
|
72
|
+
</div>
|
73
|
+
</div>
|
74
|
+
|
75
|
+
<div class="footer">
|
76
|
+
Copyright 2004-2007 Alex Gorbatchev.<br/>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<script class="javascript" src="Scripts/shCore.js"></script>
|
80
|
+
<script class="javascript" src="Scripts/shBrushCSharp.js"></script>
|
81
|
+
<script class="javascript" src="Scripts/shBrushPhp.js"></script>
|
82
|
+
<script class="javascript" src="Scripts/shBrushJScript.js"></script>
|
83
|
+
<script class="javascript" src="Scripts/shBrushJava.js"></script>
|
84
|
+
<script class="javascript" src="Scripts/shBrushVb.js"></script>
|
85
|
+
<script class="javascript" src="Scripts/shBrushSql.js"></script>
|
86
|
+
<script class="javascript" src="Scripts/shBrushXml.js"></script>
|
87
|
+
<script class="javascript" src="Scripts/shBrushDelphi.js"></script>
|
88
|
+
<script class="javascript" src="Scripts/shBrushPython.js"></script>
|
89
|
+
<script class="javascript" src="Scripts/shBrushRuby.js"></script>
|
90
|
+
<script class="javascript" src="Scripts/shBrushCss.js"></script>
|
91
|
+
<script class="javascript" src="Scripts/shBrushCpp.js"></script>
|
92
|
+
<script class="javascript">
|
93
|
+
dp.SyntaxHighlighter.ClipboardSwf = 'Scripts/clipboard.swf';
|
94
|
+
dp.SyntaxHighlighter.HighlightAll('code');
|
95
|
+
</script>
|
96
|
+
|
97
|
+
</body>
|
98
|
+
<!-- InstanceEnd --></html>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
dp.sh.Brushes.CSharp = function()
|
2
|
+
{
|
3
|
+
var keywords = 'abstract as base bool break byte case catch char checked class const ' +
|
4
|
+
'continue decimal default delegate do double else enum event explicit ' +
|
5
|
+
'extern false finally fixed float for foreach get goto if implicit in int ' +
|
6
|
+
'interface internal is lock long namespace new null object operator out ' +
|
7
|
+
'override params private protected public readonly ref return sbyte sealed set ' +
|
8
|
+
'short sizeof stackalloc static string struct switch this throw true try ' +
|
9
|
+
'typeof uint ulong unchecked unsafe ushort using virtual void while';
|
10
|
+
|
11
|
+
this.regexList = [
|
12
|
+
// There's a slight problem with matching single line comments and figuring out
|
13
|
+
// a difference between // and ///. Using lookahead and lookbehind solves the
|
14
|
+
// problem, unfortunately JavaScript doesn't support lookbehind. So I'm at a
|
15
|
+
// loss how to translate that regular expression to JavaScript compatible one.
|
16
|
+
// { regex: new RegExp('(?<!/)//(?!/).*$|(?<!/)////(?!/).*$|/\\*[^\\*]*(.)*?\\*/', 'gm'), css: 'comment' }, // one line comments starting with anything BUT '///' and multiline comments
|
17
|
+
// { regex: new RegExp('(?<!/)///(?!/).*$', 'gm'), css: 'comments' }, // XML comments starting with ///
|
18
|
+
|
19
|
+
{ regex: dp.sh.RegexLib.SingleLineCComments, css: 'comment' }, // one line comments
|
20
|
+
{ regex: dp.sh.RegexLib.MultiLineCComments, css: 'comment' }, // multiline comments
|
21
|
+
{ regex: dp.sh.RegexLib.DoubleQuotedString, css: 'string' }, // strings
|
22
|
+
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // strings
|
23
|
+
{ regex: new RegExp('^\\s*#.*', 'gm'), css: 'preprocessor' }, // preprocessor tags like #region and #endregion
|
24
|
+
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' } // c# keyword
|
25
|
+
];
|
26
|
+
|
27
|
+
this.CssClass = 'dp-c';
|
28
|
+
this.Style = '.dp-c .vars { color: #d00; }';
|
29
|
+
}
|
30
|
+
|
31
|
+
dp.sh.Brushes.CSharp.prototype = new dp.sh.Highlighter();
|
32
|
+
dp.sh.Brushes.CSharp.Aliases = ['c#', 'c-sharp', 'csharp'];
|
@@ -0,0 +1,73 @@
|
|
1
|
+
/**
|
2
|
+
* Code Syntax Highlighter for C++(Windows Platform).
|
3
|
+
* Version 0.0.2
|
4
|
+
* Copyright (C) 2006 Shin, YoungJin.
|
5
|
+
* http://www.jiniya.net/lecture/techbox/test.html
|
6
|
+
*
|
7
|
+
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
|
8
|
+
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
|
9
|
+
* any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
|
12
|
+
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
13
|
+
* details.
|
14
|
+
*
|
15
|
+
* You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to
|
16
|
+
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
17
|
+
*/
|
18
|
+
|
19
|
+
dp.sh.Brushes.Cpp = function()
|
20
|
+
{
|
21
|
+
var datatypes =
|
22
|
+
'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' +
|
23
|
+
'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' +
|
24
|
+
'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' +
|
25
|
+
'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' +
|
26
|
+
'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' +
|
27
|
+
'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' +
|
28
|
+
'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' +
|
29
|
+
'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' +
|
30
|
+
'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' +
|
31
|
+
'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' +
|
32
|
+
'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' +
|
33
|
+
'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' +
|
34
|
+
'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' +
|
35
|
+
'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' +
|
36
|
+
'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' +
|
37
|
+
'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' +
|
38
|
+
'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' +
|
39
|
+
'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' +
|
40
|
+
'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' +
|
41
|
+
'__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t ' +
|
42
|
+
'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' +
|
43
|
+
'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' +
|
44
|
+
'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' +
|
45
|
+
'va_list wchar_t wctrans_t wctype_t wint_t signed';
|
46
|
+
|
47
|
+
var keywords =
|
48
|
+
'break case catch class const __finally __exception __try ' +
|
49
|
+
'const_cast continue private public protected __declspec ' +
|
50
|
+
'default delete deprecated dllexport dllimport do dynamic_cast ' +
|
51
|
+
'else enum explicit extern if for friend goto inline ' +
|
52
|
+
'mutable naked namespace new noinline noreturn nothrow ' +
|
53
|
+
'register reinterpret_cast return selectany ' +
|
54
|
+
'sizeof static static_cast struct switch template this ' +
|
55
|
+
'thread throw true false try typedef typeid typename union ' +
|
56
|
+
'using uuid virtual void volatile whcar_t while';
|
57
|
+
|
58
|
+
this.regexList = [
|
59
|
+
{ regex: dp.sh.RegexLib.SingleLineCComments, css: 'comment' }, // one line comments
|
60
|
+
{ regex: dp.sh.RegexLib.MultiLineCComments, css: 'comment' }, // multiline comments
|
61
|
+
{ regex: dp.sh.RegexLib.DoubleQuotedString, css: 'string' }, // strings
|
62
|
+
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // strings
|
63
|
+
{ regex: new RegExp('^ *#.*', 'gm'), css: 'preprocessor' },
|
64
|
+
{ regex: new RegExp(this.GetKeywords(datatypes), 'gm'), css: 'datatypes' },
|
65
|
+
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' }
|
66
|
+
];
|
67
|
+
|
68
|
+
this.CssClass = 'dp-cpp';
|
69
|
+
this.Style = '.dp-cpp .datatypes { color: #2E8B57; font-weight: bold; }';
|
70
|
+
}
|
71
|
+
|
72
|
+
dp.sh.Brushes.Cpp.prototype = new dp.sh.Highlighter();
|
73
|
+
dp.sh.Brushes.Cpp.Aliases = ['cpp', 'c', 'c++'];
|
@@ -0,0 +1,52 @@
|
|
1
|
+
dp.sh.Brushes.CSS = function()
|
2
|
+
{
|
3
|
+
var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' +
|
4
|
+
'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' +
|
5
|
+
'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' +
|
6
|
+
'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' +
|
7
|
+
'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' +
|
8
|
+
'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' +
|
9
|
+
'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' +
|
10
|
+
'height letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' +
|
11
|
+
'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' +
|
12
|
+
'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' +
|
13
|
+
'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' +
|
14
|
+
'quotes richness right size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' +
|
15
|
+
'table-layout text-align text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' +
|
16
|
+
'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index important';
|
17
|
+
|
18
|
+
var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+
|
19
|
+
'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+
|
20
|
+
'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+
|
21
|
+
'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+
|
22
|
+
'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+
|
23
|
+
'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+
|
24
|
+
'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+
|
25
|
+
'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+
|
26
|
+
'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+
|
27
|
+
'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+
|
28
|
+
'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+
|
29
|
+
'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+
|
30
|
+
'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+
|
31
|
+
'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';
|
32
|
+
|
33
|
+
var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif';
|
34
|
+
|
35
|
+
this.regexList = [
|
36
|
+
{ regex: dp.sh.RegexLib.MultiLineCComments, css: 'comment' }, // multiline comments
|
37
|
+
{ regex: dp.sh.RegexLib.DoubleQuotedString, css: 'string' }, // double quoted strings
|
38
|
+
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // single quoted strings
|
39
|
+
{ regex: new RegExp('\\#[a-zA-Z0-9]{3,6}', 'g'), css: 'colors' }, // html colors
|
40
|
+
{ regex: new RegExp('(\\d+)(px|pt|\:)', 'g'), css: 'string' }, // size specifications
|
41
|
+
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
|
42
|
+
{ regex: new RegExp(this.GetKeywords(values), 'g'), css: 'string' }, // values
|
43
|
+
{ regex: new RegExp(this.GetKeywords(fonts), 'g'), css: 'string' } // fonts
|
44
|
+
];
|
45
|
+
|
46
|
+
this.CssClass = 'dp-css';
|
47
|
+
this.Style = '.dp-css .colors { color: darkred; }' +
|
48
|
+
'.dp-css .vars { color: #d00; }';
|
49
|
+
}
|
50
|
+
|
51
|
+
dp.sh.Brushes.CSS.prototype = new dp.sh.Highlighter();
|
52
|
+
dp.sh.Brushes.CSS.Aliases = ['css'];
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/* Delphi brush is contributed by Eddie Shipman */
|
2
|
+
dp.sh.Brushes.Delphi = function()
|
3
|
+
{
|
4
|
+
var keywords = 'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' +
|
5
|
+
'case char class comp const constructor currency destructor div do double ' +
|
6
|
+
'downto else end except exports extended false file finalization finally ' +
|
7
|
+
'for function goto if implementation in inherited int64 initialization ' +
|
8
|
+
'integer interface is label library longint longword mod nil not object ' +
|
9
|
+
'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' +
|
10
|
+
'pint64 pointer private procedure program property pshortstring pstring ' +
|
11
|
+
'pvariant pwidechar pwidestring protected public published raise real real48 ' +
|
12
|
+
'record repeat set shl shortint shortstring shr single smallint string then ' +
|
13
|
+
'threadvar to true try type unit until uses val var varirnt while widechar ' +
|
14
|
+
'widestring with word write writeln xor';
|
15
|
+
|
16
|
+
this.regexList = [
|
17
|
+
{ regex: new RegExp('\\(\\*[\\s\\S]*?\\*\\)', 'gm'), css: 'comment' }, // multiline comments (* *)
|
18
|
+
{ regex: new RegExp('{(?!\\$)[\\s\\S]*?}', 'gm'), css: 'comment' }, // multiline comments { }
|
19
|
+
{ regex: dp.sh.RegexLib.SingleLineCComments, css: 'comment' }, // one line
|
20
|
+
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // strings
|
21
|
+
{ regex: new RegExp('\\{\\$[a-zA-Z]+ .+\\}', 'g'), css: 'directive' }, // Compiler Directives and Region tags
|
22
|
+
{ regex: new RegExp('\\b[\\d\\.]+\\b', 'g'), css: 'number' }, // numbers 12345
|
23
|
+
{ regex: new RegExp('\\$[a-zA-Z0-9]+\\b', 'g'), css: 'number' }, // numbers $F5D3
|
24
|
+
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' } // keyword
|
25
|
+
];
|
26
|
+
|
27
|
+
this.CssClass = 'dp-delphi';
|
28
|
+
this.Style = '.dp-delphi .number { color: blue; }' +
|
29
|
+
'.dp-delphi .directive { color: #008284; }' +
|
30
|
+
'.dp-delphi .vars { color: #000; }';
|
31
|
+
}
|
32
|
+
|
33
|
+
dp.sh.Brushes.Delphi.prototype = new dp.sh.Highlighter();
|
34
|
+
dp.sh.Brushes.Delphi.Aliases = ['delphi', 'pascal'];
|
@@ -0,0 +1,22 @@
|
|
1
|
+
dp.sh.Brushes.JScript = function()
|
2
|
+
{
|
3
|
+
var keywords = 'abstract boolean break byte case catch char class const continue debugger ' +
|
4
|
+
'default delete do double else enum export extends false final finally float ' +
|
5
|
+
'for function goto if implements import in instanceof int interface long native ' +
|
6
|
+
'new null package private protected public return short static super switch ' +
|
7
|
+
'synchronized this throw throws transient true try typeof var void volatile while with';
|
8
|
+
|
9
|
+
this.regexList = [
|
10
|
+
{ regex: dp.sh.RegexLib.SingleLineCComments, css: 'comment' }, // one line comments
|
11
|
+
{ regex: dp.sh.RegexLib.MultiLineCComments, css: 'comment' }, // multiline comments
|
12
|
+
{ regex: dp.sh.RegexLib.DoubleQuotedString, css: 'string' }, // double quoted strings
|
13
|
+
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // single quoted strings
|
14
|
+
{ regex: new RegExp('^\\s*#.*', 'gm'), css: 'preprocessor' }, // preprocessor tags like #region and #endregion
|
15
|
+
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' } // keywords
|
16
|
+
];
|
17
|
+
|
18
|
+
this.CssClass = 'dp-c';
|
19
|
+
}
|
20
|
+
|
21
|
+
dp.sh.Brushes.JScript.prototype = new dp.sh.Highlighter();
|
22
|
+
dp.sh.Brushes.JScript.Aliases = ['js', 'jscript', 'javascript'];
|
@@ -0,0 +1,28 @@
|
|
1
|
+
dp.sh.Brushes.Java = function()
|
2
|
+
{
|
3
|
+
var keywords = 'abstract assert boolean break byte case catch char class const ' +
|
4
|
+
'continue default do double else enum extends ' +
|
5
|
+
'false final finally float for goto if implements import ' +
|
6
|
+
'instanceof int interface long native new null ' +
|
7
|
+
'package private protected public return ' +
|
8
|
+
'short static strictfp super switch synchronized this throw throws true ' +
|
9
|
+
'transient try void volatile while';
|
10
|
+
|
11
|
+
this.regexList = [
|
12
|
+
{ regex: dp.sh.RegexLib.SingleLineCComments, css: 'comment' }, // one line comments
|
13
|
+
{ regex: dp.sh.RegexLib.MultiLineCComments, css: 'comment' }, // multiline comments
|
14
|
+
{ regex: dp.sh.RegexLib.DoubleQuotedString, css: 'string' }, // strings
|
15
|
+
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // strings
|
16
|
+
{ regex: new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b', 'gi'), css: 'number' }, // numbers
|
17
|
+
{ regex: new RegExp('(?!\\@interface\\b)\\@[\\$\\w]+\\b', 'g'), css: 'annotation' }, // annotation @anno
|
18
|
+
{ regex: new RegExp('\\@interface\\b', 'g'), css: 'keyword' }, // @interface keyword
|
19
|
+
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' } // java keyword
|
20
|
+
];
|
21
|
+
|
22
|
+
this.CssClass = 'dp-j';
|
23
|
+
this.Style = '.dp-j .annotation { color: #646464; }' +
|
24
|
+
'.dp-j .number { color: #C00000; }';
|
25
|
+
}
|
26
|
+
|
27
|
+
dp.sh.Brushes.Java.prototype = new dp.sh.Highlighter();
|
28
|
+
dp.sh.Brushes.Java.Aliases = ['java'];
|
@@ -0,0 +1,60 @@
|
|
1
|
+
dp.sh.Brushes.Php = function()
|
2
|
+
{
|
3
|
+
var funcs = 'abs acos acosh addcslashes addslashes ' +
|
4
|
+
'array_change_key_case array_chunk array_combine array_count_values array_diff '+
|
5
|
+
'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+
|
6
|
+
'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+
|
7
|
+
'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+
|
8
|
+
'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+
|
9
|
+
'array_push array_rand array_reduce array_reverse array_search array_shift '+
|
10
|
+
'array_slice array_splice array_sum array_udiff array_udiff_assoc '+
|
11
|
+
'array_udiff_uassoc array_uintersect array_uintersect_assoc '+
|
12
|
+
'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+
|
13
|
+
'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+
|
14
|
+
'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+
|
15
|
+
'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+
|
16
|
+
'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+
|
17
|
+
'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+
|
18
|
+
'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+
|
19
|
+
'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+
|
20
|
+
'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+
|
21
|
+
'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+
|
22
|
+
'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+
|
23
|
+
'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+
|
24
|
+
'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+
|
25
|
+
'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+
|
26
|
+
'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+
|
27
|
+
'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+
|
28
|
+
'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+
|
29
|
+
'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+
|
30
|
+
'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+
|
31
|
+
'parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir '+
|
32
|
+
'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+
|
33
|
+
'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+
|
34
|
+
'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+
|
35
|
+
'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+
|
36
|
+
'strtoupper strtr strval substr substr_compare';
|
37
|
+
|
38
|
+
var keywords = 'and or xor __FILE__ __LINE__ array as break case ' +
|
39
|
+
'cfunction class const continue declare default die do else ' +
|
40
|
+
'elseif empty enddeclare endfor endforeach endif endswitch endwhile ' +
|
41
|
+
'extends for foreach function include include_once global if ' +
|
42
|
+
'new old_function return static switch use require require_once ' +
|
43
|
+
'var while __FUNCTION__ __CLASS__ ' +
|
44
|
+
'__METHOD__ abstract interface public implements extends private protected throw';
|
45
|
+
|
46
|
+
this.regexList = [
|
47
|
+
{ regex: dp.sh.RegexLib.SingleLineCComments, css: 'comment' }, // one line comments
|
48
|
+
{ regex: dp.sh.RegexLib.MultiLineCComments, css: 'comment' }, // multiline comments
|
49
|
+
{ regex: dp.sh.RegexLib.DoubleQuotedString, css: 'string' }, // double quoted strings
|
50
|
+
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // single quoted strings
|
51
|
+
{ regex: new RegExp('\\$\\w+', 'g'), css: 'vars' }, // variables
|
52
|
+
{ regex: new RegExp(this.GetKeywords(funcs), 'gmi'), css: 'func' }, // functions
|
53
|
+
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' } // keyword
|
54
|
+
];
|
55
|
+
|
56
|
+
this.CssClass = 'dp-c';
|
57
|
+
}
|
58
|
+
|
59
|
+
dp.sh.Brushes.Php.prototype = new dp.sh.Highlighter();
|
60
|
+
dp.sh.Brushes.Php.Aliases = ['php'];
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/* Python 2.3 syntax contributed by Gheorghe Milas */
|
2
|
+
dp.sh.Brushes.Python = function()
|
3
|
+
{
|
4
|
+
var keywords = 'and assert break class continue def del elif else ' +
|
5
|
+
'except exec finally for from global if import in is ' +
|
6
|
+
'lambda not or pass print raise return try yield while';
|
7
|
+
|
8
|
+
var special = 'None True False self cls class_'
|
9
|
+
|
10
|
+
this.regexList = [
|
11
|
+
{ regex: dp.sh.RegexLib.SingleLinePerlComments, css: 'comment' },
|
12
|
+
{ regex: new RegExp("^\\s*@\\w+", 'gm'), css: 'decorator' },
|
13
|
+
{ regex: new RegExp("(['\"]{3})([^\\1])*?\\1", 'gm'), css: 'comment' },
|
14
|
+
{ regex: new RegExp('"(?!")(?:\\.|\\\\\\"|[^\\""\\n\\r])*"', 'gm'), css: 'string' },
|
15
|
+
{ regex: new RegExp("'(?!')*(?:\\.|(\\\\\\')|[^\\''\\n\\r])*'", 'gm'), css: 'string' },
|
16
|
+
{ regex: new RegExp("\\b\\d+\\.?\\w*", 'g'), css: 'number' },
|
17
|
+
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' },
|
18
|
+
{ regex: new RegExp(this.GetKeywords(special), 'gm'), css: 'special' },
|
19
|
+
];
|
20
|
+
|
21
|
+
this.CssClass = 'dp-py';
|
22
|
+
this.Style = '.dp-py .builtins { color: #ff1493; }' +
|
23
|
+
'.dp-py .magicmethods { color: #808080; }' +
|
24
|
+
'.dp-py .exceptions { color: brown; }' +
|
25
|
+
'.dp-py .types { color: brown; font-style: italic; }' +
|
26
|
+
'.dp-py .commonlibs { color: #8A2BE2; font-style: italic; }';
|
27
|
+
}
|
28
|
+
|
29
|
+
dp.sh.Brushes.Python.prototype = new dp.sh.Highlighter();
|
30
|
+
dp.sh.Brushes.Python.Aliases = ['py', 'python'];
|
@@ -0,0 +1,28 @@
|
|
1
|
+
/* Ruby 1.8.4 syntax contributed by Erik Peterson */
|
2
|
+
dp.sh.Brushes.Ruby = function()
|
3
|
+
{
|
4
|
+
var keywords = 'alias and BEGIN begin break case class def define_method defined do each else elsif ' +
|
5
|
+
'END end ensure false for if in module new next nil not or raise redo rescue retry return ' +
|
6
|
+
'self super then throw true undef unless until when while yield';
|
7
|
+
|
8
|
+
var builtins = 'Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload ' +
|
9
|
+
'Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ' +
|
10
|
+
'ThreadGroup Thread Time TrueClass'
|
11
|
+
|
12
|
+
this.regexList = [
|
13
|
+
{ regex: dp.sh.RegexLib.SingleLinePerlComments, css: 'comment' }, // one line comments
|
14
|
+
{ regex: dp.sh.RegexLib.DoubleQuotedString, css: 'string' }, // double quoted strings
|
15
|
+
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // single quoted strings
|
16
|
+
{ regex: new RegExp(':[a-z][A-Za-z0-9_]*', 'g'), css: 'symbol' }, // symbols
|
17
|
+
{ regex: new RegExp('(\\$|@@|@)\\w+', 'g'), css: 'variable' }, // $global, @instance, and @@class variables
|
18
|
+
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
|
19
|
+
{ regex: new RegExp(this.GetKeywords(builtins), 'gm'), css: 'builtin' } // builtins
|
20
|
+
];
|
21
|
+
|
22
|
+
this.CssClass = 'dp-rb';
|
23
|
+
this.Style = '.dp-rb .symbol { color: #a70; }' +
|
24
|
+
'.dp-rb .variable { color: #a70; font-weight: bold; }';
|
25
|
+
}
|
26
|
+
|
27
|
+
dp.sh.Brushes.Ruby.prototype = new dp.sh.Highlighter();
|
28
|
+
dp.sh.Brushes.Ruby.Aliases = ['ruby', 'rails', 'ror'];
|