No changes
This commit is contained in:
parent
8680a02b13
commit
b6b398f5bf
17374 changed files with 2475441 additions and 0 deletions
71
ControlPanel/modules/ftp/plugins/codepress/languages/asp.css
Normal file
71
ControlPanel/modules/ftp/plugins/codepress/languages/asp.css
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* CodePress color styles for ASP-VB syntax highlighting
|
||||
* By Martin D. Kirk
|
||||
*/
|
||||
/* tags */
|
||||
|
||||
b {
|
||||
color:#000080;
|
||||
}
|
||||
/* comments */
|
||||
big, big b, big em, big ins, big s, strong i, strong i b, strong i s, strong i u, strong i a, strong i a u, strong i s u {
|
||||
color:gray;
|
||||
font-weight:normal;
|
||||
}
|
||||
/* ASP comments */
|
||||
strong dfn, strong dfn a,strong dfn var, strong dfn a u, strong dfn u{
|
||||
color:gray;
|
||||
font-weight:normal;
|
||||
}
|
||||
/* attributes */
|
||||
s, s b, span s u, span s cite, strong span s {
|
||||
color:#5656fa ;
|
||||
font-weight:normal;
|
||||
}
|
||||
/* strings */
|
||||
strong s,strong s b, strong s u, strong s cite {
|
||||
color:#009900;
|
||||
font-weight:normal;
|
||||
}
|
||||
strong ins{
|
||||
color:#000000;
|
||||
font-weight:bold;
|
||||
}
|
||||
/* Syntax */
|
||||
strong a, strong a u {
|
||||
color:#0000FF;
|
||||
font-weight:;
|
||||
}
|
||||
/* Native Keywords */
|
||||
strong u {
|
||||
color:#990099;
|
||||
font-weight:bold;
|
||||
}
|
||||
/* Numbers */
|
||||
strong var{
|
||||
color:#FF0000;
|
||||
}
|
||||
/* ASP Language */
|
||||
span{
|
||||
color:#990000;
|
||||
font-weight:bold;
|
||||
}
|
||||
strong i,strong a i, strong u i {
|
||||
color:#009999;
|
||||
}
|
||||
/* style */
|
||||
em {
|
||||
color:#800080;
|
||||
font-style:normal;
|
||||
}
|
||||
/* script */
|
||||
ins {
|
||||
color:#800000;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
/* <?php and ?> */
|
||||
cite, s cite {
|
||||
color:red;
|
||||
font-weight:bold;
|
||||
}
|
||||
117
ControlPanel/modules/ftp/plugins/codepress/languages/asp.js
Normal file
117
ControlPanel/modules/ftp/plugins/codepress/languages/asp.js
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
* CodePress regular expressions for ASP-vbscript syntax highlighting
|
||||
*/
|
||||
|
||||
// ASP VBScript
|
||||
Language.syntax = [
|
||||
// all tags
|
||||
{ input : /(<[^!%|!%@]*?>)/g, output : '<b>$1</b>' },
|
||||
// style tags
|
||||
{ input : /(<style.*?>)(.*?)(<\/style>)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' },
|
||||
// script tags
|
||||
{ input : /(<script.*?>)(.*?)(<\/script>)/g, output : '<ins>$1</ins><ins>$2</ins><ins>$3</ins>' },
|
||||
// strings "" and attributes
|
||||
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' },
|
||||
// ASP Comment
|
||||
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<dfn>\'$1$2</dfn>'},
|
||||
// <%.*
|
||||
{ input : /(<%)/g, output : '<strong>$1' },
|
||||
// .*%>
|
||||
{ input : /(%>)/g, output : '$1</strong>' },
|
||||
// <%@...%>
|
||||
{ input : /(<%@)(.+?)(%>)/gi, output : '$1<span>$2</span>$3' },
|
||||
//Numbers
|
||||
{ input : /\b([\d]+)\b/g, output : '<var>$1</var>' },
|
||||
// Reserved Words 1 (Blue)
|
||||
{ input : /\b(And|As|ByRef|ByVal|Call|Case|Class|Const|Dim|Do|Each|Else|ElseIf|Empty|End|Eqv|Exit|False|For|Function)\b/gi, output : '<a>$1</a>' },
|
||||
{ input : /\b(Get|GoTo|If|Imp|In|Is|Let|Loop|Me|Mod|Enum|New|Next|Not|Nothing|Null|On|Option|Or|Private|Public|ReDim|Rem)\b/gi, output : '<a>$1</a>' },
|
||||
{ input : /\b(Resume|Select|Set|Stop|Sub|Then|To|True|Until|Wend|While|With|Xor|Execute|Randomize|Erase|ExecuteGlobal|Explicit|step)\b/gi, output : '<a>$1</a>' },
|
||||
// Reserved Words 2 (Purple)
|
||||
{ input : /\b(Abandon|Abs|AbsolutePage|AbsolutePosition|ActiveCommand|ActiveConnection|ActualSize|AddHeader|AddNew|AppendChunk)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(AppendToLog|Application|Array|Asc|Atn|Attributes|BeginTrans|BinaryRead|BinaryWrite|BOF|Bookmark|Boolean|Buffer|Byte)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(CacheControl|CacheSize|Cancel|CancelBatch|CancelUpdate|CBool|CByte|CCur|CDate|CDbl|Charset|Chr|CInt|Clear)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(ClientCertificate|CLng|Clone|Close|CodePage|CommandText|CommandType|CommandTimeout|CommitTrans|CompareBookmarks|ConnectionString|ConnectionTimeout)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(Contents|ContentType|Cookies|Cos|CreateObject|CreateParameter|CSng|CStr|CursorLocation|CursorType|DataMember|DataSource|Date|DateAdd|DateDiff)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(DatePart|DateSerial|DateValue|Day|DefaultDatabase|DefinedSize|Delete|Description|Double|EditMode|Eof|EOF|err|Error)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(Exp|Expires|ExpiresAbsolute|Filter|Find|Fix|Flush|Form|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(GetChunk|GetLastError|GetRows|GetString|Global|HelpContext|HelpFile|Hex|Hour|HTMLEncode|IgnoreCase|Index|InStr|InStrRev)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(Int|Integer|IsArray|IsClientConnected|IsDate|IsolationLevel|Join|LBound|LCase|LCID|Left|Len|Lock|LockType|Log|Long|LTrim)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(MapPath|MarshalOptions|MaxRecords|Mid|Minute|Mode|Month|MonthName|Move|MoveFirst|MoveLast|MoveNext|MovePrevious|Name|NextRecordset)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(Now|Number|NumericScale|ObjectContext|Oct|Open|OpenSchema|OriginalValue|PageCount|PageSize|Pattern|PICS|Precision|Prepared|Property)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(Provider|QueryString|RecordCount|Redirect|RegExp|Remove|RemoveAll|Replace|Requery|Request|Response|Resync|Right|Rnd)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(RollbackTrans|RTrim|Save|ScriptTimeout|Second|Seek|Server|ServerVariables|Session|SessionID|SetAbort|SetComplete|Sgn)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(Sin|Size|Sort|Source|Space|Split|Sqr|State|StaticObjects|Status|StayInSync|StrComp|String|StrReverse|Supports|Tan|Time)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(Timeout|Timer|TimeSerial|TimeValue|TotalBytes|Transfer|Trim|Type|Type|UBound|UCase|UnderlyingValue|UnLock|Update|UpdateBatch)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(URLEncode|Value|Value|Version|Weekday|WeekdayName|Write|Year)\b/gi, output : '<u>$1</u>' },
|
||||
// Reserved Words 3 (Turquis)
|
||||
{ input : /\b(vbBlack|vbRed|vbGreen|vbYellow|vbBlue|vbMagenta|vbCyan|vbWhite|vbBinaryCompare|vbTextCompare)\b/gi, output : '<i>$1</i>' },
|
||||
{ input : /\b(vbSunday|vbMonday|vbTuesday|vbWednesday|vbThursday|vbFriday|vbSaturday|vbUseSystemDayOfWeek)\b/gi, output : '<i>$1</i>' },
|
||||
{ input : /\b(vbFirstJan1|vbFirstFourDays|vbFirstFullWeek|vbGeneralDate|vbLongDate|vbShortDate|vbLongTime|vbShortTime)\b/gi, output : '<i>$1</i>' },
|
||||
{ input : /\b(vbObjectError|vbCr|VbCrLf|vbFormFeed|vbLf|vbNewLine|vbNullChar|vbNullString|vbTab|vbVerticalTab|vbUseDefault|vbTrue)\b/gi, output : '<i>$1</i>' },
|
||||
{ input : /\b(vbFalse|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant)\b/gi, output : '<i>$1</i>' },
|
||||
{ input : /\b(vbDataObject|vbDecimal|vbByte|vbArray)\b/gi, output : '<i>$1</i>' },
|
||||
// html comments
|
||||
{ input : /(<!--.*?-->.)/g, output : '<big>$1</big>' }
|
||||
]
|
||||
|
||||
Language.Functions = [
|
||||
// Output at index 0, must be the desired tagname surrounding a $1
|
||||
// Name is the index from the regex that marks the functionname
|
||||
{input : /(function|sub)([ ]*?)(\w+)([ ]*?\()/gi , output : '<ins>$1</ins>', name : '$3'}
|
||||
]
|
||||
|
||||
Language.snippets = [
|
||||
//Conditional
|
||||
{ input : 'if', output : 'If $0 Then\n\t\nEnd If' },
|
||||
{ input : 'ifelse', output : 'If $0 Then\n\t\n\nElse\n\t\nEnd If' },
|
||||
{ input : 'case', output : 'Select Case $0\n\tCase ?\n\tCase Else\nEnd Select'},
|
||||
//Response
|
||||
{ input : 'rw', output : 'Response.Write( $0 )' },
|
||||
{ input : 'resc', output : 'Response.Cookies( $0 )' },
|
||||
{ input : 'resb', output : 'Response.Buffer'},
|
||||
{ input : 'resflu', output : 'Response.Flush()'},
|
||||
{ input : 'resend', output : 'Response.End'},
|
||||
//Request
|
||||
{ input : 'reqc', output : 'Request.Cookies( $0 )' },
|
||||
{ input : 'rq', output : 'Request.Querystring("$0")' },
|
||||
{ input : 'rf', output : 'Request.Form("$0")' },
|
||||
//FSO
|
||||
{ input : 'fso', output : 'Set fso = Server.CreateObject("Scripting.FileSystemObject")\n$0' },
|
||||
{ input : 'setfo', output : 'Set fo = fso.getFolder($0)' },
|
||||
{ input : 'setfi', output : 'Set fi = fso.getFile($0)' },
|
||||
{ input : 'twr', output : 'Set f = fso.CreateTextFile($0,true)\'overwrite\nf.WriteLine()\nf.Close'},
|
||||
{ input : 'tre', output : 'Set f = fso.OpenTextFile($0, 1)\nf.ReadAll\nf.Close'},
|
||||
//Server
|
||||
{ input : 'mapp', output : 'Server.Mappath($0)' },
|
||||
//Loops
|
||||
{ input : 'foreach', output : 'For Each $0 in ?\n\t\nNext' },
|
||||
{ input : 'for', output : 'For $0 to ? step ?\n\t\nNext' },
|
||||
{ input : 'do', output : 'Do While($0)\n\t\nLoop' },
|
||||
{ input : 'untilrs', output : 'do until rs.eof\n\t\nrs.movenext\nloop' },
|
||||
//ADO
|
||||
{ input : 'adorec', output : 'Set rs = Server.CreateObject("ADODB.Recordset")' },
|
||||
{ input : 'adocon', output : 'Set Conn = Server.CreateObject("ADODB.Connection")' },
|
||||
{ input : 'adostr', output : 'Set oStr = Server.CreateObject("ADODB.Stream")' },
|
||||
//Http Request
|
||||
{ input : 'xmlhttp', output : 'Set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP")\nxmlHttp.open("GET", $0, false)\nxmlHttp.send()\n?=xmlHttp.responseText' },
|
||||
{ input : 'xmldoc', output : 'Set xmldoc = Server.CreateObject("Microsoft.XMLDOM")\nxmldoc.async=false\nxmldoc.load(request)'},
|
||||
//Functions
|
||||
{ input : 'func', output : 'Function $0()\n\t\n\nEnd Function'},
|
||||
{ input : 'sub', output : 'Sub $0()\n\t\nEnd Sub'}
|
||||
|
||||
]
|
||||
|
||||
Language.complete = [
|
||||
//{ input : '\'', output : '\'$0\'' },
|
||||
{ input : '"', output : '"$0"' },
|
||||
{ input : '(', output : '\($0\)' },
|
||||
{ input : '[', output : '\[$0\]' },
|
||||
{ input : '{', output : '{\n\t$0\n}' }
|
||||
]
|
||||
|
||||
Language.shortcuts = [
|
||||
{ input : '[space]', output : ' ' },
|
||||
{ input : '[enter]', output : '<br />' } ,
|
||||
{ input : '[j]', output : 'testing' },
|
||||
{ input : '[7]', output : '&' }
|
||||
]
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* CodePress color styles for AutoIt syntax highlighting
|
||||
*/
|
||||
|
||||
u {font-style:normal;color:#000090;font-weight:bold;font-family:Monospace;}
|
||||
var {color:#AA0000;font-weight:bold;font-style:normal;}
|
||||
em {color:#FF33FF;}
|
||||
ins {color:#AC00A9;}
|
||||
i {color:#F000FF;}
|
||||
b {color:#FF0000;}
|
||||
a {color:#0080FF;font-weight:bold;}
|
||||
s, s u, s b {color:#9999CC;font-weight:normal;}
|
||||
cite, cite *{color:#009933;font-weight:normal;}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* CodePress regular expressions for AutoIt syntax highlighting
|
||||
* @author: James Brooks, Michael HURNI
|
||||
*/
|
||||
|
||||
// AutoIt
|
||||
Language.syntax = [
|
||||
{ input : /({|}|\(|\))/g, output : '<b>$1</b>' }, // Brackets
|
||||
{ input : /(\*|\+|-)/g, output : '<b>$1</b>' }, // Operator
|
||||
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : "<s>\"$1$2</s>" }, // strings double
|
||||
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single
|
||||
{ input : /\b([\d]+)\b/g, output : '<ins>$1</ins>' }, // Numbers
|
||||
{ input : /#(.*?)(<br>|<\/P>)/g, output : '<i>#$1</i>$2' }, // Directives and Includes
|
||||
{ input : /(\$[\w\.]*)/g, output : '<var>$1</var>' }, // vars
|
||||
{ input : /(_[\w\.]*)/g, output : '<a>$1</a>' }, // underscored word
|
||||
{ input : /(\@[\w\.]*)/g, output : '<em>$1</em>' }, // Macros
|
||||
{ input : /\b(Abs|ACos|AdlibDisable|AdlibEnable|Asc|AscW|ASin|Assign|ATan|AutoItSetOption|AutoItWinGetTitle|AutoItWinSetTitle|Beep|Binary|BinaryLen|BinaryMid|BinaryToString|BitAND|BitNOT|BitOR|BitSHIFT|BitXOR|BlockInput|Break|Call|CDTray|Ceiling|Chr|ChrW|ClipGet|ClipPut|ConsoleRead|ConsoleWrite|ConsoleWriteError|ControlClick|ControlCommand|ControlDisable|ControlEnable|ControlFocus|ControlGetFocus|ControlGetHandle|ControlGetPos|ControlGetText|ControlHide|ControlListView|ControlMove|ControlSend|ControlSetText|ControlShow|Cos|Dec|DirCopy|DirCreate|DirGetSize|DirMove|DirRemove|DllCall|DllCall|DllClose|DllOpen|DllStructCreate|DllStructGetData|DllStructGetPtr|DllStructGetSize|DllStructSetData|DriveGetDrive|DriveGetFileSystem|DriveGetLabel|DriveGetSerial|DriveGetType|DriveMapAdd|DriveMapDel|DriveMapGet|DriveSetLabel|DriveSpaceFree|DriveSpaceTotal|DriveStatus|EnvGet|EnvSet|EnvUpdate|Eval|Execute|Exp|FileChangeDir|FileClose|FileCopy|FileCreateNTFS|FileCreateShortcut|FileDelete|FileExists|FileFindFirstFile|FileFindNextFile|FileGetAttrib|FileGetLongName|FileGetShortcut|FileGetShortName|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileOpen|FileOpenDialog|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileSaveDialog|FileSelectFolder|FileSetAttrib|FileSetTime|FileWrite|FileWriteLine|Floor|FtpSetProxy|GuiCreate|GuiCtrlCreateAvi|GuiCtrlCreateButton|GuiCtrlCreateCheckbox|GuiCtrlCreateCombo|GuiCtrlCreateContextMenu|GuiCtrlCreateDate|GuiCtrlCreateDummy|GuiCtrlCreateEdit|GuiCtrlCreateGraphic|GuiCtrlCreateGroup|GuiCtrlCreateIcon|GuiCtrlCreateInput|GuiCtrlCreateLabel|GuiCtrlCreateList|GuiCtrlCreateListView|GuiCtrlCreateListViewItem|GuiCtrlCreateMenu|GuiCtrlCreateMenuItem|GuiCtrlCreateMonthCal|GuiCtrlCreateObj|GuiCtrlCreatePic|GuiCtrlCreateProgress|GuiCtrlCreateRadio|GuiCtrlCreateSlider|GuiCtrlCreateTab|GuiCtrlCreateTabItem|GuiCtrlCreateUpdown|GuiCtrlDelete|GuiCtrlGetHandle|GuiCtrlGetState|GuiCtrlRead|GuiCtrlRecvMsg|GuiCtrlSentMsg|GuiCtrlSendToDummy|GuiCtrlSetBkColor|GuiCtrlSetColor|GuiCtrlSetCursor|GuiCtrlSetData|GuiCtrlSetFont|GuiCtrlSetGraphic|GuiCtrlSetImage|GuiCtrlSetLimit|GuiCtrlSetOnEvent|GuiCtrlSetPos|GuiCtrlResizing|GuiCtrlSetState|GuiCtrlSetTip|GuiDelete|GuiGetCursorInfo|GuiGetMsg|GuiGetStyle|GuiRegisterMsg|GuiSetBkColor|GuiSetCoord|GuiSetCursor|GuiSetFont|GuiSetHelp|GuiSetIcon|GuiSetOnEvent|GuiSetStat|GuiSetStyle|GuiStartGroup|GuiSwitch|Hex|HotKeySet|HttpSetProxy|HWnd|InetGet|InetGetSize|IniDelete|IniRead|IniReadSection|IniReadSectionNames|IniRenameSection|IniWrite|IniWriteSection|InputBox|Int|IsAdmin|IsArray|IsBinary|IsBool|IsDeclared|IsDllStruct|IsFloat|IsHWnd|IsInt|IsKeyword|IsNumber|IsObj|IsString|Log|MemGetStats|Mod|MouseClick|MouseClickDrag|MouseDown|MouseGetCursor|MouseGetPos|MouseMove|MouseUp|MouseWheel|MsgBox|Number|ObjCreate|ObjEvent|ObjGet|ObjName|Ping|PixelCheckSum|PixelGetColor|PixelSearch|ProcessClose|ProcessExists|ProcessList|ProcessSetPriority|ProcessWait|ProcessWaitClose|ProgressOff|ProcessOn|ProgressSet|Random|RegDelete|RegEnumKey|RegEnumVal|RegRead|RegWrite|Round|Run|RunAsSet|RunWait|Send|SetError|SetExtended|ShellExecute|ShellExecuteWait|Shutdown|Sin|Sleep|SoundPlay|SoundSetWaveVolume|SplashImageOn|SplashOff|SplashTextOn|Sqrt|SRandom|StatusbarGetText|StderrRead|StdinWrite|StdoutRead|String|StringAddCR|StringCompare|StringFormat|StringInStr|StringIsAlNum|StringIsAlpha|StringIsASCII|StringIsDigit|StringIsFloat|StringIsInt|StringIsLower|StringIsSpace|StringIsUpper|StringIsXDigit|StringLeft|StringLen|StringLower|StringMid|StringRegExp|StringRegExpReplace|StringReplace|StringRight|StringSplit|StringStripCR|StringStripWS|StringToBinary|StringTrimLeft|StringTrimRight|StringUpper|Tan|TCPAccept|TCPCloseSocket|TCPConnect|TCPListen|TCPNameToIP|TCPrecv|TCPSend|TCPShutdown|TCPStartup|TimerDiff|TimerInit|ToolTip|TrayCreateItem|TrayCreateMenu|TrayGetMenu|TrayGetMsg|TrayItemDelete|TrayItemGetHandle|TrayItemGetState|TrayItemGetText|TrayItemSetOnEvent|TrayItemSetState|TrayItemSetText|TraySetClick|TraySetIcon|TraySetOnEvent|TraySetPauseIcon|TraySetState|TraySetToolTip|TrayTip|UBound|UDPBind|UDPCloseSocket|UDPOpen|UDPRecv|UDPSend|WinActivate|WinActive|WinClose|WinExists|WinFlash|WinGetCaretPos|WinGetClassList|WinGetClientSize|WinGetHandle|WinGetPos|WinGetProcess|WinGetState|WinGetText|WinGetTitle|WinKill|WinList|WinMenuSelectItem|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinSetOnTop|WinSetState|WinSetTitle|WinSetTrans|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/g, output : '<u>$1</u>' } ,// reserved words
|
||||
{ input : /\B;(.*?)(<br>|<\/P>)/g, output : '<cite>;$1</cite>$2' }, // comments
|
||||
{ input : /#CS(.*?)#CE/g, output : '<cite>#CS$1#CE</cite>' } // Block Comments
|
||||
]
|
||||
|
||||
Language.snippets = []
|
||||
|
||||
Language.complete = [
|
||||
{ input : '\'',output : '\'$0\'' },
|
||||
{ input : '"', output : '"$0"' },
|
||||
{ input : '(', output : '\($0\)' },
|
||||
{ input : '[', output : '\[$0\]' },
|
||||
{ input : '{', output : '{\n\t$0\n}' }
|
||||
]
|
||||
|
||||
Language.shortcuts = []
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* CodePress color styles for Java syntax highlighting
|
||||
* By Edwin de Jonge
|
||||
*/
|
||||
|
||||
b {color:#7F0055;font-weight:bold;font-style:normal;} /* reserved words */
|
||||
a {color:#2A0088;font-weight:bold;font-style:normal;} /* types */
|
||||
i, i b, i s {color:#3F7F5F;font-weight:bold;} /* comments */
|
||||
s, s b {color:#2A00FF;font-weight:normal;} /* strings */
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* CodePress regular expressions for C# syntax highlighting
|
||||
* By Edwin de Jonge
|
||||
*/
|
||||
|
||||
Language.syntax = [ // C#
|
||||
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
|
||||
{ input : /\'(.?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
|
||||
{ input : /\b(abstract|as|base|break|case|catch|checked|continue|default|delegate|do|else|event|explicit|extern|false|finally|fixed|for|foreach|get|goto|if|implicit|in|interface|internal|is|lock|namespace|new|null|object|operator|out|override|params|partial|private|protected|public|readonly|ref|return|set|sealed|sizeof|static|stackalloc|switch|this|throw|true|try|typeof|unchecked|unsafe|using|value|virtual|while)\b/g, output : '<b>$1</b>' }, // reserved words
|
||||
{ input : /\b(bool|byte|char|class|double|float|int|interface|long|string|struct|void)\b/g, output : '<a>$1</a>' }, // types
|
||||
{ input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // comments //
|
||||
{ input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' } // comments /* */
|
||||
];
|
||||
|
||||
Language.snippets = [];
|
||||
|
||||
Language.complete = [ // Auto complete only for 1 character
|
||||
{input : '\'',output : '\'$0\'' },
|
||||
{input : '"', output : '"$0"' },
|
||||
{input : '(', output : '\($0\)' },
|
||||
{input : '[', output : '\[$0\]' },
|
||||
{input : '{', output : '{\n\t$0\n}' }
|
||||
];
|
||||
|
||||
Language.shortcuts = [];
|
||||
10
ControlPanel/modules/ftp/plugins/codepress/languages/css.css
Normal file
10
ControlPanel/modules/ftp/plugins/codepress/languages/css.css
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* CodePress color styles for CSS syntax highlighting
|
||||
*/
|
||||
|
||||
b, b a, b u {color:#000080;} /* tags, ids, classes */
|
||||
i, i b, i s, i a, i u {color:gray;} /* comments */
|
||||
s, s b {color:#a0a0dd;} /* parameters */
|
||||
a {color:#0000ff;} /* keys */
|
||||
u {color:red;} /* values */
|
||||
|
||||
23
ControlPanel/modules/ftp/plugins/codepress/languages/css.js
Normal file
23
ControlPanel/modules/ftp/plugins/codepress/languages/css.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* CodePress regular expressions for CSS syntax highlighting
|
||||
*/
|
||||
|
||||
// CSS
|
||||
Language.syntax = [
|
||||
{ input : /(.*?){(.*?)}/g,output : '<b>$1</b>{<u>$2</u>}' }, // tags, ids, classes, values
|
||||
{ input : /([\w-]*?):([^\/])/g,output : '<a>$1</a>:$2' }, // keys
|
||||
{ input : /\((.*?)\)/g,output : '(<s>$1</s>)' }, // parameters
|
||||
{ input : /\/\*(.*?)\*\//g,output : '<i>/*$1*/</i>'} // comments
|
||||
]
|
||||
|
||||
Language.snippets = []
|
||||
|
||||
Language.complete = [
|
||||
{ input : '\'',output : '\'$0\'' },
|
||||
{ input : '"', output : '"$0"' },
|
||||
{ input : '(', output : '\($0\)' },
|
||||
{ input : '[', output : '\[$0\]' },
|
||||
{ input : '{', output : '{\n\t$0\n}' }
|
||||
]
|
||||
|
||||
Language.shortcuts = []
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* CodePress color styles for generic syntax highlighting
|
||||
*/
|
||||
|
||||
b {color:#7F0055;font-weight:bold;} /* reserved words */
|
||||
u {color:darkblue;font-weight:bold;} /* special words */
|
||||
i, i b, i s, i u, i em {color:green;font-weight:normal;} /* comments */
|
||||
s, s b, s em {color:#2A00FF;font-weight:normal;} /* strings */
|
||||
em {font-weight:bold;} /* special chars */
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* CodePress regular expressions for generic syntax highlighting
|
||||
*/
|
||||
|
||||
// generic languages
|
||||
Language.syntax = [
|
||||
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
|
||||
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
|
||||
{ input : /\b(abstract|continue|for|new|switch|default|goto|boolean|do|if|private|this|break|double|protected|throw|byte|else|import|public|throws|case|return|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|const|float|while|function|label)\b/g, output : '<b>$1</b>' }, // reserved words
|
||||
{ input : /([\(\){}])/g, output : '<em>$1</em>' }, // special chars;
|
||||
{ input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // comments //
|
||||
{ input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' } // comments /* */
|
||||
]
|
||||
|
||||
Language.snippets = []
|
||||
|
||||
Language.complete = [
|
||||
{ input : '\'', output : '\'$0\'' },
|
||||
{ input : '"', output : '"$0"' },
|
||||
{ input : '(', output : '\($0\)' },
|
||||
{ input : '[', output : '\[$0\]' },
|
||||
{ input : '{', output : '{\n\t$0\n}' }
|
||||
]
|
||||
|
||||
Language.shortcuts = []
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* CodePress color styles for HTML syntax highlighting
|
||||
*/
|
||||
|
||||
b {color:#000080;} /* tags */
|
||||
ins, ins b, ins s, ins em {color:gray;} /* comments */
|
||||
s, s b {color:#7777e4;} /* attribute values */
|
||||
a {color:green;} /* links */
|
||||
u {color:#E67300;} /* forms */
|
||||
big {color:#db0000;} /* images */
|
||||
em, em b {color:#800080;} /* style */
|
||||
strong {color:#800000;} /* script */
|
||||
tt i {color:darkblue;font-weight:bold;} /* script reserved words */
|
||||
59
ControlPanel/modules/ftp/plugins/codepress/languages/html.js
Normal file
59
ControlPanel/modules/ftp/plugins/codepress/languages/html.js
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* CodePress regular expressions for HTML syntax highlighting
|
||||
*/
|
||||
|
||||
// HTML
|
||||
Language.syntax = [
|
||||
{ input : /(<[^!]*?>)/g, output : '<b>$1</b>' }, // all tags
|
||||
{ input : /(<a .*?>|<\/a>)/g, output : '<a>$1</a>' }, // links
|
||||
{ input : /(<img .*?>)/g, output : '<big>$1</big>' }, // images
|
||||
{ input : /(<\/?(button|textarea|form|input|select|option|label).*?>)/g, output : '<u>$1</u>' }, // forms
|
||||
{ input : /(<style.*?>)(.*?)(<\/style>)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' }, // style tags
|
||||
{ input : /(<script.*?>)(.*?)(<\/script>)/g, output : '<strong>$1</strong><tt>$2</tt><strong>$3</strong>' }, // script tags
|
||||
{ input : /=(".*?")/g, output : '=<s>$1</s>' }, // atributes double quote
|
||||
{ input : /=('.*?')/g, output : '=<s>$1</s>' }, // atributes single quote
|
||||
{ input : /(<!--.*?-->.)/g, output : '<ins>$1</ins>' }, // comments
|
||||
{ input : /\b(alert|window|document|break|continue|do|for|new|this|void|case|default|else|function|return|typeof|while|if|label|switch|var|with|catch|boolean|int|try|false|throws|null|true|goto)\b/g, output : '<i>$1</i>' } // script reserved words
|
||||
]
|
||||
|
||||
Language.snippets = [
|
||||
{ input : 'aref', output : '<a href="$0"></a>' },
|
||||
{ input : 'h1', output : '<h1>$0</h1>' },
|
||||
{ input : 'h2', output : '<h2>$0</h2>' },
|
||||
{ input : 'h3', output : '<h3>$0</h3>' },
|
||||
{ input : 'h4', output : '<h4>$0</h4>' },
|
||||
{ input : 'h5', output : '<h5>$0</h5>' },
|
||||
{ input : 'h6', output : '<h6>$0</h6>' },
|
||||
{ input : 'html', output : '<html>\n\t$0\n</html>' },
|
||||
{ input : 'head', output : '<head>\n\t<meta http-equiv="content-type" content="text/html; charset=utf-8" />\n\t<title>$0</title>\n\t\n</head>' },
|
||||
{ input : 'img', output : '<img src="$0" alt="" />' },
|
||||
{ input : 'input', output : '<input name="$0" id="" type="" value="" />' },
|
||||
{ input : 'label', output : '<label for="$0"></label>' },
|
||||
{ input : 'legend', output : '<legend>\n\t$0\n</legend>' },
|
||||
{ input : 'link', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },
|
||||
{ input : 'base', output : '<base href="$0" />' },
|
||||
{ input : 'body', output : '<body>\n\t$0\n</body>' },
|
||||
{ input : 'css', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },
|
||||
{ input : 'div', output : '<div>\n\t$0\n</div>' },
|
||||
{ input : 'divid', output : '<div id="$0">\n\t\n</div>' },
|
||||
{ input : 'dl', output : '<dl>\n\t<dt>\n\t\t$0\n\t</dt>\n\t<dd></dd>\n</dl>' },
|
||||
{ input : 'fieldset', output : '<fieldset>\n\t$0\n</fieldset>' },
|
||||
{ input : 'form', output : '<form action="$0" method="" name="">\n\t\n</form>' },
|
||||
{ input : 'meta', output : '<meta name="$0" content="" />' },
|
||||
{ input : 'p', output : '<p>$0</p>' },
|
||||
{ input : 'script', output : '<script type="text/javascript" language="javascript" charset="utf-8">\n\t$0\t\n</script>' },
|
||||
{ input : 'scriptsrc', output : '<script src="$0" type="text/javascript" language="javascript" charset="utf-8"></script>' },
|
||||
{ input : 'span', output : '<span>$0</span>' },
|
||||
{ input : 'table', output : '<table border="$0" cellspacing="" cellpadding="">\n\t<tr><th></th></tr>\n\t<tr><td></td></tr>\n</table>' },
|
||||
{ input : 'style', output : '<style type="text/css" media="screen">\n\t$0\n</style>' }
|
||||
]
|
||||
|
||||
Language.complete = [
|
||||
{ input : '\'',output : '\'$0\'' },
|
||||
{ input : '"', output : '"$0"' },
|
||||
{ input : '(', output : '\($0\)' },
|
||||
{ input : '[', output : '\[$0\]' },
|
||||
{ input : '{', output : '{\n\t$0\n}' }
|
||||
]
|
||||
|
||||
Language.shortcuts = []
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* CodePress color styles for Java syntax highlighting
|
||||
*/
|
||||
|
||||
b {color:#7F0055;font-weight:bold;font-style:normal;} /* reserved words */
|
||||
i, i b, i s {color:#3F7F5F;font-weight:bold;} /* comments */
|
||||
s, s b {color:#2A00FF;font-weight:normal;} /* strings */
|
||||
24
ControlPanel/modules/ftp/plugins/codepress/languages/java.js
Normal file
24
ControlPanel/modules/ftp/plugins/codepress/languages/java.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* CodePress regular expressions for Java syntax highlighting
|
||||
*/
|
||||
|
||||
// Java
|
||||
Language.syntax = [
|
||||
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>'}, // strings double quote
|
||||
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>'}, // strings single quote
|
||||
{ input : /\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/g, output : '<b>$1</b>'}, // reserved words
|
||||
{ input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3'}, // comments //
|
||||
{ input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' }// comments /* */
|
||||
]
|
||||
|
||||
Language.snippets = []
|
||||
|
||||
Language.complete = [
|
||||
{ input : '\'',output : '\'$0\'' },
|
||||
{ input : '"', output : '"$0"' },
|
||||
{ input : '(', output : '\($0\)' },
|
||||
{ input : '[', output : '\[$0\]' },
|
||||
{ input : '{', output : '{\n\t$0\n}' }
|
||||
]
|
||||
|
||||
Language.shortcuts = []
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/*
|
||||
* CodePress color styles for JavaScript syntax highlighting
|
||||
*/
|
||||
|
||||
b {color:#7F0055;font-weight:bold;} /* reserved words */
|
||||
u {color:darkblue;font-weight:bold;} /* special words */
|
||||
i, i b, i s, i u {color:green;font-weight:normal;} /* comments */
|
||||
s, s b, s u {color:#2A00FF;font-weight:normal;} /* strings */
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* CodePress regular expressions for JavaScript syntax highlighting
|
||||
*/
|
||||
|
||||
// JavaScript
|
||||
Language.syntax = [
|
||||
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
|
||||
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
|
||||
{ input : /\b(break|continue|do|for|new|this|void|case|default|else|function|return|typeof|while|if|label|switch|var|with|catch|boolean|int|try|false|throws|null|true|goto)\b/g, output : '<b>$1</b>' }, // reserved words
|
||||
{ input : /\b(alert|isNaN|parent|Array|parseFloat|parseInt|blur|clearTimeout|prompt|prototype|close|confirm|length|Date|location|Math|document|element|name|self|elements|setTimeout|navigator|status|String|escape|Number|submit|eval|Object|event|onblur|focus|onerror|onfocus|onclick|top|onload|toString|onunload|unescape|open|valueOf|window|onmouseover)\b/g, output : '<u>$1</u>' }, // special words
|
||||
{ input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // comments //
|
||||
{ input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' } // comments /* */
|
||||
]
|
||||
|
||||
Language.snippets = [
|
||||
{ input : 'dw', output : 'document.write(\'$0\');' },
|
||||
{ input : 'getid', output : 'document.getElementById(\'$0\')' },
|
||||
{ input : 'fun', output : 'function $0(){\n\t\n}' },
|
||||
{ input : 'func', output : 'function $0(){\n\t\n}' }
|
||||
]
|
||||
|
||||
Language.complete = [
|
||||
{ input : '\'',output : '\'$0\'' },
|
||||
{ input : '"', output : '"$0"' },
|
||||
{ input : '(', output : '\($0\)' },
|
||||
{ input : '[', output : '\[$0\]' },
|
||||
{ input : '{', output : '{\n\t$0\n}' }
|
||||
]
|
||||
|
||||
Language.shortcuts = []
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* CodePress color styles for Perl syntax highlighting
|
||||
* By J. Nick Koston
|
||||
*/
|
||||
|
||||
b {color:#7F0055;font-weight:bold;} /* reserved words */
|
||||
i, i b, i s, i em, i a, i u {color:gray;font-weight:normal;} /* comments */
|
||||
s, s b, s a, s em, s u {color:#2A00FF;font-weight:normal;} /* strings */
|
||||
a {color:#006700;font-weight:bold;} /* variables */
|
||||
em {color:darkblue;font-weight:bold;} /* functions */
|
||||
u {font-weight:bold;} /* special chars */
|
||||
27
ControlPanel/modules/ftp/plugins/codepress/languages/perl.js
Normal file
27
ControlPanel/modules/ftp/plugins/codepress/languages/perl.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* CodePress regular expressions for Perl syntax highlighting
|
||||
* By J. Nick Koston
|
||||
*/
|
||||
|
||||
// Perl
|
||||
Language.syntax = [
|
||||
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
|
||||
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
|
||||
{ input : /([\$\@\%][\w\.]*)/g, output : '<a>$1</a>' }, // vars
|
||||
{ input : /(sub\s+)([\w\.]*)/g, output : '$1<em>$2</em>' }, // functions
|
||||
{ input : /\b(abs|accept|alarm|atan2|bind|binmode|bless|caller|chdir|chmod|chomp|chop|chown|chr|chroot|close|closedir|connect|continue|cos|crypt|dbmclose|dbmopen|defined|delete|die|do|dump|each|else|elsif|endgrent|endhostent|endnetent|endprotoent|endpwent|eof|eval|exec|exists|exit|fcntl|fileno|find|flock|for|foreach|fork|format|formlinegetc|getgrent|getgrgid|getgrnam|gethostbyaddr|gethostbyname|gethostent|getlogin|getnetbyaddr|getnetbyname|getnetent|getpeername|getpgrp|getppid|getpriority|getprotobyname|getprotobynumber|getprotoent|getpwent|getpwnam|getpwuid|getservbyaddr|getservbyname|getservbyport|getservent|getsockname|getsockopt|glob|gmtime|goto|grep|hex|hostname|if|import|index|int|ioctl|join|keys|kill|last|lc|lcfirst|length|link|listen|LoadExternals|local|localtime|log|lstat|map|mkdir|msgctl|msgget|msgrcv|msgsnd|my|next|no|oct|open|opendir|ordpack|package|pipe|pop|pos|print|printf|push|pwd|qq|quotemeta|qw|rand|read|readdir|readlink|recv|redo|ref|rename|require|reset|return|reverse|rewinddir|rindex|rmdir|scalar|seek|seekdir|select|semctl|semget|semop|send|setgrent|sethostent|setnetent|setpgrp|setpriority|setprotoent|setpwent|setservent|setsockopt|shift|shmctl|shmget|shmread|shmwrite|shutdown|sin|sleep|socket|socketpair|sort|splice|split|sprintf|sqrt|srand|stat|stty|study|sub|substr|symlink|syscall|sysopen|sysread|system|syswritetell|telldir|tie|tied|time|times|tr|truncate|uc|ucfirst|umask|undef|unless|unlink|until|unpack|unshift|untie|use|utime|values|vec|waitpid|wantarray|warn|while|write)\b/g, output : '<b>$1</b>' }, // reserved words
|
||||
{ input : /([\(\){}])/g, output : '<u>$1</u>' }, // special chars
|
||||
{ input : /#(.*?)(<br>|<\/P>)/g, output : '<i>#$1</i>$2' } // comments
|
||||
]
|
||||
|
||||
Language.snippets = []
|
||||
|
||||
Language.complete = [
|
||||
{ input : '\'',output : '\'$0\'' },
|
||||
{ input : '"', output : '"$0"' },
|
||||
{ input : '(', output : '\($0\)' },
|
||||
{ input : '[', output : '\[$0\]' },
|
||||
{ input : '{', output : '{\n\t$0\n}' }
|
||||
]
|
||||
|
||||
Language.shortcuts = []
|
||||
12
ControlPanel/modules/ftp/plugins/codepress/languages/php.css
Normal file
12
ControlPanel/modules/ftp/plugins/codepress/languages/php.css
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* CodePress color styles for PHP syntax highlighting
|
||||
*/
|
||||
|
||||
b {color:#000080;} /* tags */
|
||||
big, big b, big em, big ins, big s, strong i, strong i b, strong i s, strong i u, strong i a, strong i a u, strong i s u {color:gray;font-weight:normal;} /* comments */
|
||||
s, s b, strong s u, strong s cite {color:#5656fa;font-weight:normal;} /* attributes and strings */
|
||||
strong a, strong a u {color:#006700;font-weight:bold;} /* variables */
|
||||
em {color:#800080;font-style:normal;} /* style */
|
||||
ins {color:#800000;} /* script */
|
||||
strong u {color:#7F0055;font-weight:bold;} /* reserved words */
|
||||
cite, s cite {color:red;font-weight:bold;} /* <?php and ?> */
|
||||
61
ControlPanel/modules/ftp/plugins/codepress/languages/php.js
Normal file
61
ControlPanel/modules/ftp/plugins/codepress/languages/php.js
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* CodePress regular expressions for PHP syntax highlighting
|
||||
*/
|
||||
|
||||
// PHP
|
||||
Language.syntax = [
|
||||
{ input : /(<[^!\?]*?>)/g, output : '<b>$1</b>' }, // all tags
|
||||
{ input : /(<style.*?>)(.*?)(<\/style>)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' }, // style tags
|
||||
{ input : /(<script.*?>)(.*?)(<\/script>)/g, output : '<ins>$1</ins><ins>$2</ins><ins>$3</ins>' }, // script tags
|
||||
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
|
||||
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>'}, // strings single quote
|
||||
{ input : /(<\?)/g, output : '<strong>$1' }, // <?.*
|
||||
{ input : /(\?>)/g, output : '$1</strong>' }, // .*?>
|
||||
{ input : /(<\?php|<\?=|<\?|\?>)/g, output : '<cite>$1</cite>' }, // php tags
|
||||
{ input : /(\$[\w\.]*)/g, output : '<a>$1</a>' }, // vars
|
||||
{ input : /\b(false|true|and|or|xor|__FILE__|exception|__LINE__|array|as|break|case|class|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|for|foreach|function|global|if|include|include_once|isset|list|new|print|require|require_once|return|static|switch|unset|use|while|__FUNCTION__|__CLASS__|__METHOD__|final|php_user_filter|interface|implements|extends|public|private|protected|abstract|clone|try|catch|throw|this)\b/g, output : '<u>$1</u>' }, // reserved words
|
||||
{ input : /([^:])\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // php comments //
|
||||
{ input : /([^:])#(.*?)(<br|<\/P)/g, output : '$1<i>#$2</i>$3' }, // php comments #
|
||||
{ input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' }, // php comments /* */
|
||||
{ input : /(<!--.*?-->.)/g, output : '<big>$1</big>' } // html comments
|
||||
]
|
||||
|
||||
Language.snippets = [
|
||||
{ input : 'if', output : 'if($0){\n\t\n}' },
|
||||
{ input : 'ifelse', output : 'if($0){\n\t\n}\nelse{\n\t\n}' },
|
||||
{ input : 'else', output : '}\nelse {\n\t' },
|
||||
{ input : 'elseif', output : '}\nelseif($0) {\n\t' },
|
||||
{ input : 'do', output : 'do{\n\t$0\n}\nwhile();' },
|
||||
{ input : 'inc', output : 'include_once("$0");' },
|
||||
{ input : 'fun', output : 'function $0(){\n\t\n}' },
|
||||
{ input : 'func', output : 'function $0(){\n\t\n}' },
|
||||
{ input : 'while', output : 'while($0){\n\t\n}' },
|
||||
{ input : 'for', output : 'for($0,,){\n\t\n}' },
|
||||
{ input : 'fore', output : 'foreach($0 as ){\n\t\n}' },
|
||||
{ input : 'foreach', output : 'foreach($0 as ){\n\t\n}' },
|
||||
{ input : 'echo', output : 'echo \'$0\';' },
|
||||
{ input : 'switch', output : 'switch($0) {\n\tcase "": break;\n\tdefault: ;\n}' },
|
||||
{ input : 'case', output : 'case "$0" : break;' },
|
||||
{ input : 'ret0', output : 'return false;' },
|
||||
{ input : 'retf', output : 'return false;' },
|
||||
{ input : 'ret1', output : 'return true;' },
|
||||
{ input : 'rett', output : 'return true;' },
|
||||
{ input : 'ret', output : 'return $0;' },
|
||||
{ input : 'def', output : 'define(\'$0\',\'\');' },
|
||||
{ input : '<?', output : 'php\n$0\n?>' }
|
||||
]
|
||||
|
||||
Language.complete = [
|
||||
{ input : '\'', output : '\'$0\'' },
|
||||
{ input : '"', output : '"$0"' },
|
||||
{ input : '(', output : '\($0\)' },
|
||||
{ input : '[', output : '\[$0\]' },
|
||||
{ input : '{', output : '{\n\t$0\n}' }
|
||||
]
|
||||
|
||||
Language.shortcuts = [
|
||||
{ input : '[space]', output : ' ' },
|
||||
{ input : '[enter]', output : '<br />' } ,
|
||||
{ input : '[j]', output : 'testing' },
|
||||
{ input : '[7]', output : '&' }
|
||||
]
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* CodePress color styles for Ruby syntax highlighting
|
||||
*/
|
||||
|
||||
b {color:#7F0055;font-weight:bold;} /* reserved words */
|
||||
i, i b, i s, i em, i a, i u {color:gray;font-weight:normal;} /* comments */
|
||||
s, s b, s a, s em, s u {color:#2A00FF;font-weight:normal;} /* strings */
|
||||
a {color:#006700;font-weight:bold;} /* variables */
|
||||
em {color:darkblue;font-weight:bold;} /* functions */
|
||||
u {font-weight:bold;} /* special chars */
|
||||
26
ControlPanel/modules/ftp/plugins/codepress/languages/ruby.js
Normal file
26
ControlPanel/modules/ftp/plugins/codepress/languages/ruby.js
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* CodePress regular expressions for Perl syntax highlighting
|
||||
*/
|
||||
|
||||
// Ruby
|
||||
Language.syntax = [
|
||||
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
|
||||
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
|
||||
{ input : /([\$\@\%]+)([\w\.]*)/g, output : '<a>$1$2</a>' }, // vars
|
||||
{ input : /(def\s+)([\w\.]*)/g, output : '$1<em>$2</em>' }, // functions
|
||||
{ input : /\b(alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\b/g, output : '<b>$1</b>' }, // reserved words
|
||||
{ input : /([\(\){}])/g, output : '<u>$1</u>' }, // special chars
|
||||
{ input : /#(.*?)(<br>|<\/P>)/g, output : '<i>#$1</i>$2' } // comments
|
||||
];
|
||||
|
||||
Language.snippets = []
|
||||
|
||||
Language.complete = [
|
||||
{ input : '\'',output : '\'$0\'' },
|
||||
{ input : '"', output : '"$0"' },
|
||||
{ input : '(', output : '\($0\)' },
|
||||
{ input : '[', output : '\[$0\]' },
|
||||
{ input : '{', output : '{\n\t$0\n}' }
|
||||
]
|
||||
|
||||
Language.shortcuts = []
|
||||
10
ControlPanel/modules/ftp/plugins/codepress/languages/sql.css
Normal file
10
ControlPanel/modules/ftp/plugins/codepress/languages/sql.css
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* CodePress color styles for SQL syntax highlighting
|
||||
* By Merlin Moncure
|
||||
*/
|
||||
|
||||
b {color:#0000FF;font-style:normal;font-weight:bold;} /* reserved words */
|
||||
u {color:#FF0000;font-style:normal;} /* types */
|
||||
a {color:#CD6600;font-style:normal;font-weight:bold;} /* commands */
|
||||
i, i b, i u, i a, i s {color:#A9A9A9;font-weight:normal;font-style:italic;} /* comments */
|
||||
s, s b, s u, s a, s i {color:#2A00FF;font-weight:normal;} /* strings */
|
||||
30
ControlPanel/modules/ftp/plugins/codepress/languages/sql.js
Normal file
30
ControlPanel/modules/ftp/plugins/codepress/languages/sql.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* CodePress regular expressions for SQL syntax highlighting
|
||||
* By Merlin Moncure
|
||||
*/
|
||||
|
||||
// SQL
|
||||
Language.syntax = [
|
||||
{ input : /\'(.*?)(\')/g, output : '<s>\'$1$2</s>' }, // strings single quote
|
||||
{ input : /\b(add|after|aggregate|alias|all|and|as|authorization|between|by|cascade|cache|cache|called|case|check|column|comment|constraint|createdb|createuser|cycle|database|default|deferrable|deferred|diagnostics|distinct|domain|each|else|elseif|elsif|encrypted|except|exception|for|foreign|from|from|full|function|get|group|having|if|immediate|immutable|in|increment|initially|increment|index|inherits|inner|input|intersect|into|invoker|is|join|key|language|left|like|limit|local|loop|match|maxvalue|minvalue|natural|nextval|no|nocreatedb|nocreateuser|not|null|of|offset|oids|on|only|operator|or|order|outer|owner|partial|password|perform|plpgsql|primary|record|references|replace|restrict|return|returns|right|row|rule|schema|security|sequence|session|sql|stable|statistics|table|temp|temporary|then|time|to|transaction|trigger|type|unencrypted|union|unique|user|using|valid|value|values|view|volatile|when|where|with|without|zone)\b/gi, output : '<b>$1</b>' }, // reserved words
|
||||
{ input : /\b(bigint|bigserial|bit|boolean|box|bytea|char|character|cidr|circle|date|decimal|double|float4|float8|inet|int2|int4|int8|integer|interval|line|lseg|macaddr|money|numeric|oid|path|point|polygon|precision|real|refcursor|serial|serial4|serial8|smallint|text|timestamp|varbit|varchar)\b/gi, output : '<u>$1</u>' }, // types
|
||||
{ input : /\b(abort|alter|analyze|begin|checkpoint|close|cluster|comment|commit|copy|create|deallocate|declare|delete|drop|end|execute|explain|fetch|grant|insert|listen|load|lock|move|notify|prepare|reindex|reset|restart|revoke|rollback|select|set|show|start|truncate|unlisten|update)\b/gi, output : '<a>$1</a>' }, // commands
|
||||
{ input : /([^:]|^)\-\-(.*?)(<br|<\/P)/g, output: '$1<i>--$2</i>$3' } // comments //
|
||||
]
|
||||
|
||||
Language.snippets = [
|
||||
{ input : 'select', output : 'select $0 from where ' }
|
||||
]
|
||||
|
||||
Language.complete = [
|
||||
{ input : '\'', output : '\'$0\'' },
|
||||
{ input : '"', output : '"$0"' },
|
||||
{ input : '(', output : '\($0\)' },
|
||||
{ input : '[', output : '\[$0\]' },
|
||||
{ input : '{', output : '{\n\t$0\n}' }
|
||||
]
|
||||
|
||||
Language.shortcuts = []
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
/*
|
||||
* CodePress color styles for Text syntax highlighting
|
||||
*/
|
||||
|
||||
/* do nothing as expected */
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* CodePress regular expressions for Text syntax highlighting
|
||||
*/
|
||||
|
||||
// plain text
|
||||
Language.syntax = []
|
||||
Language.snippets = []
|
||||
Language.complete = []
|
||||
Language.shortcuts = []
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* CodePress color styles for ASP-VB syntax highlighting
|
||||
* By Martin D. Kirk
|
||||
*/
|
||||
|
||||
/* tags */
|
||||
b {
|
||||
color:#000080;
|
||||
}
|
||||
/* comments */
|
||||
big, big b, big em, big ins, big s, strong i, strong i b, strong i s, strong i u, strong i a, strong i a u, strong i s u {
|
||||
color:gray;
|
||||
font-weight:normal;
|
||||
}
|
||||
/* ASP comments */
|
||||
strong dfn, strong dfn a,strong dfn var, strong dfn a u, strong dfn u{
|
||||
color:gray;
|
||||
font-weight:normal;
|
||||
}
|
||||
/* attributes */
|
||||
s, s b, span s u, span s cite, strong span s {
|
||||
color:#5656fa ;
|
||||
font-weight:normal;
|
||||
}
|
||||
/* strings */
|
||||
strong s,strong s b, strong s u, strong s cite {
|
||||
color:#009900;
|
||||
font-weight:normal;
|
||||
}
|
||||
strong ins{
|
||||
color:#000000;
|
||||
font-weight:bold;
|
||||
}
|
||||
/* Syntax */
|
||||
strong a, strong a u {
|
||||
color:#0000FF;
|
||||
font-weight:;
|
||||
}
|
||||
/* Native Keywords */
|
||||
strong u {
|
||||
color:#990099;
|
||||
font-weight:bold;
|
||||
}
|
||||
/* Numbers */
|
||||
strong var{
|
||||
color:#FF0000;
|
||||
}
|
||||
/* ASP Language */
|
||||
span{
|
||||
color:#990000;
|
||||
font-weight:bold;
|
||||
}
|
||||
strong i,strong a i, strong u i {
|
||||
color:#009999;
|
||||
}
|
||||
/* style */
|
||||
em {
|
||||
color:#800080;
|
||||
font-style:normal;
|
||||
}
|
||||
/* script */
|
||||
ins {
|
||||
color:#800000;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
/* <?php and ?> */
|
||||
cite, s cite {
|
||||
color:red;
|
||||
font-weight:bold;
|
||||
}
|
||||
117
ControlPanel/modules/ftp/plugins/codepress/languages/vbscript.js
Normal file
117
ControlPanel/modules/ftp/plugins/codepress/languages/vbscript.js
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
* CodePress regular expressions for ASP-vbscript syntax highlighting
|
||||
*/
|
||||
|
||||
// ASP VBScript
|
||||
Language.syntax = [
|
||||
// all tags
|
||||
{ input : /(<[^!%|!%@]*?>)/g, output : '<b>$1</b>' },
|
||||
// style tags
|
||||
{ input : /(<style.*?>)(.*?)(<\/style>)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' },
|
||||
// script tags
|
||||
{ input : /(<script.*?>)(.*?)(<\/script>)/g, output : '<ins>$1</ins><ins>$2</ins><ins>$3</ins>' },
|
||||
// strings "" and attributes
|
||||
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' },
|
||||
// ASP Comment
|
||||
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<dfn>\'$1$2</dfn>'},
|
||||
// <%.*
|
||||
{ input : /(<%)/g, output : '<strong>$1' },
|
||||
// .*%>
|
||||
{ input : /(%>)/g, output : '$1</strong>' },
|
||||
// <%@...%>
|
||||
{ input : /(<%@)(.+?)(%>)/gi, output : '$1<span>$2</span>$3' },
|
||||
//Numbers
|
||||
{ input : /\b([\d]+)\b/g, output : '<var>$1</var>' },
|
||||
// Reserved Words 1 (Blue)
|
||||
{ input : /\b(And|As|ByRef|ByVal|Call|Case|Class|Const|Dim|Do|Each|Else|ElseIf|Empty|End|Eqv|Exit|False|For|Function)\b/gi, output : '<a>$1</a>' },
|
||||
{ input : /\b(Get|GoTo|If|Imp|In|Is|Let|Loop|Me|Mod|Enum|New|Next|Not|Nothing|Null|On|Option|Or|Private|Public|ReDim|Rem)\b/gi, output : '<a>$1</a>' },
|
||||
{ input : /\b(Resume|Select|Set|Stop|Sub|Then|To|True|Until|Wend|While|With|Xor|Execute|Randomize|Erase|ExecuteGlobal|Explicit|step)\b/gi, output : '<a>$1</a>' },
|
||||
// Reserved Words 2 (Purple)
|
||||
{ input : /\b(Abandon|Abs|AbsolutePage|AbsolutePosition|ActiveCommand|ActiveConnection|ActualSize|AddHeader|AddNew|AppendChunk)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(AppendToLog|Application|Array|Asc|Atn|Attributes|BeginTrans|BinaryRead|BinaryWrite|BOF|Bookmark|Boolean|Buffer|Byte)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(CacheControl|CacheSize|Cancel|CancelBatch|CancelUpdate|CBool|CByte|CCur|CDate|CDbl|Charset|Chr|CInt|Clear)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(ClientCertificate|CLng|Clone|Close|CodePage|CommandText|CommandType|CommandTimeout|CommitTrans|CompareBookmarks|ConnectionString|ConnectionTimeout)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(Contents|ContentType|Cookies|Cos|CreateObject|CreateParameter|CSng|CStr|CursorLocation|CursorType|DataMember|DataSource|Date|DateAdd|DateDiff)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(DatePart|DateSerial|DateValue|Day|DefaultDatabase|DefinedSize|Delete|Description|Double|EditMode|Eof|EOF|err|Error)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(Exp|Expires|ExpiresAbsolute|Filter|Find|Fix|Flush|Form|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(GetChunk|GetLastError|GetRows|GetString|Global|HelpContext|HelpFile|Hex|Hour|HTMLEncode|IgnoreCase|Index|InStr|InStrRev)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(Int|Integer|IsArray|IsClientConnected|IsDate|IsolationLevel|Join|LBound|LCase|LCID|Left|Len|Lock|LockType|Log|Long|LTrim)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(MapPath|MarshalOptions|MaxRecords|Mid|Minute|Mode|Month|MonthName|Move|MoveFirst|MoveLast|MoveNext|MovePrevious|Name|NextRecordset)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(Now|Number|NumericScale|ObjectContext|Oct|Open|OpenSchema|OriginalValue|PageCount|PageSize|Pattern|PICS|Precision|Prepared|Property)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(Provider|QueryString|RecordCount|Redirect|RegExp|Remove|RemoveAll|Replace|Requery|Request|Response|Resync|Right|Rnd)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(RollbackTrans|RTrim|Save|ScriptTimeout|Second|Seek|Server|ServerVariables|Session|SessionID|SetAbort|SetComplete|Sgn)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(Sin|Size|Sort|Source|Space|Split|Sqr|State|StaticObjects|Status|StayInSync|StrComp|String|StrReverse|Supports|Tan|Time)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(Timeout|Timer|TimeSerial|TimeValue|TotalBytes|Transfer|Trim|Type|Type|UBound|UCase|UnderlyingValue|UnLock|Update|UpdateBatch)\b/gi, output : '<u>$1</u>' },
|
||||
{ input : /\b(URLEncode|Value|Value|Version|Weekday|WeekdayName|Write|Year)\b/gi, output : '<u>$1</u>' },
|
||||
// Reserved Words 3 (Turquis)
|
||||
{ input : /\b(vbBlack|vbRed|vbGreen|vbYellow|vbBlue|vbMagenta|vbCyan|vbWhite|vbBinaryCompare|vbTextCompare)\b/gi, output : '<i>$1</i>' },
|
||||
{ input : /\b(vbSunday|vbMonday|vbTuesday|vbWednesday|vbThursday|vbFriday|vbSaturday|vbUseSystemDayOfWeek)\b/gi, output : '<i>$1</i>' },
|
||||
{ input : /\b(vbFirstJan1|vbFirstFourDays|vbFirstFullWeek|vbGeneralDate|vbLongDate|vbShortDate|vbLongTime|vbShortTime)\b/gi, output : '<i>$1</i>' },
|
||||
{ input : /\b(vbObjectError|vbCr|VbCrLf|vbFormFeed|vbLf|vbNewLine|vbNullChar|vbNullString|vbTab|vbVerticalTab|vbUseDefault|vbTrue)\b/gi, output : '<i>$1</i>' },
|
||||
{ input : /\b(vbFalse|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant)\b/gi, output : '<i>$1</i>' },
|
||||
{ input : /\b(vbDataObject|vbDecimal|vbByte|vbArray)\b/gi, output : '<i>$1</i>' },
|
||||
// html comments
|
||||
{ input : /(<!--.*?-->.)/g, output : '<big>$1</big>' }
|
||||
]
|
||||
|
||||
Language.Functions = [
|
||||
// Output at index 0, must be the desired tagname surrounding a $1
|
||||
// Name is the index from the regex that marks the functionname
|
||||
{input : /(function|sub)([ ]*?)(\w+)([ ]*?\()/gi , output : '<ins>$1</ins>', name : '$3'}
|
||||
]
|
||||
|
||||
Language.snippets = [
|
||||
//Conditional
|
||||
{ input : 'if', output : 'If $0 Then\n\t\nEnd If' },
|
||||
{ input : 'ifelse', output : 'If $0 Then\n\t\n\nElse\n\t\nEnd If' },
|
||||
{ input : 'case', output : 'Select Case $0\n\tCase ?\n\tCase Else\nEnd Select'},
|
||||
//Response
|
||||
{ input : 'rw', output : 'Response.Write( $0 )' },
|
||||
{ input : 'resc', output : 'Response.Cookies( $0 )' },
|
||||
{ input : 'resb', output : 'Response.Buffer'},
|
||||
{ input : 'resflu', output : 'Response.Flush()'},
|
||||
{ input : 'resend', output : 'Response.End'},
|
||||
//Request
|
||||
{ input : 'reqc', output : 'Request.Cookies( $0 )' },
|
||||
{ input : 'rq', output : 'Request.Querystring("$0")' },
|
||||
{ input : 'rf', output : 'Request.Form("$0")' },
|
||||
//FSO
|
||||
{ input : 'fso', output : 'Set fso = Server.CreateObject("Scripting.FileSystemObject")\n$0' },
|
||||
{ input : 'setfo', output : 'Set fo = fso.getFolder($0)' },
|
||||
{ input : 'setfi', output : 'Set fi = fso.getFile($0)' },
|
||||
{ input : 'twr', output : 'Set f = fso.CreateTextFile($0,true)\'overwrite\nf.WriteLine()\nf.Close'},
|
||||
{ input : 'tre', output : 'Set f = fso.OpenTextFile($0, 1)\nf.ReadAll\nf.Close'},
|
||||
//Server
|
||||
{ input : 'mapp', output : 'Server.Mappath($0)' },
|
||||
//Loops
|
||||
{ input : 'foreach', output : 'For Each $0 in ?\n\t\nNext' },
|
||||
{ input : 'for', output : 'For $0 to ? step ?\n\t\nNext' },
|
||||
{ input : 'do', output : 'Do While($0)\n\t\nLoop' },
|
||||
{ input : 'untilrs', output : 'do until rs.eof\n\t\nrs.movenext\nloop' },
|
||||
//ADO
|
||||
{ input : 'adorec', output : 'Set rs = Server.CreateObject("ADODB.Recordset")' },
|
||||
{ input : 'adocon', output : 'Set Conn = Server.CreateObject("ADODB.Connection")' },
|
||||
{ input : 'adostr', output : 'Set oStr = Server.CreateObject("ADODB.Stream")' },
|
||||
//Http Request
|
||||
{ input : 'xmlhttp', output : 'Set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP")\nxmlHttp.open("GET", $0, false)\nxmlHttp.send()\n?=xmlHttp.responseText' },
|
||||
{ input : 'xmldoc', output : 'Set xmldoc = Server.CreateObject("Microsoft.XMLDOM")\nxmldoc.async=false\nxmldoc.load(request)'},
|
||||
//Functions
|
||||
{ input : 'func', output : 'Function $0()\n\t\n\nEnd Function'},
|
||||
{ input : 'sub', output : 'Sub $0()\n\t\nEnd Sub'}
|
||||
|
||||
]
|
||||
|
||||
Language.complete = [
|
||||
//{ input : '\'', output : '\'$0\'' },
|
||||
{ input : '"', output : '"$0"' },
|
||||
{ input : '(', output : '\($0\)' },
|
||||
{ input : '[', output : '\[$0\]' },
|
||||
{ input : '{', output : '{\n\t$0\n}' }
|
||||
]
|
||||
|
||||
Language.shortcuts = [
|
||||
{ input : '[space]', output : ' ' },
|
||||
{ input : '[enter]', output : '<br />' } ,
|
||||
{ input : '[j]', output : 'testing' },
|
||||
{ input : '[7]', output : '&' }
|
||||
]
|
||||
15
ControlPanel/modules/ftp/plugins/codepress/languages/xsl.css
Normal file
15
ControlPanel/modules/ftp/plugins/codepress/languages/xsl.css
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* CodePress color styles for HTML syntax highlighting
|
||||
* By RJ Bruneel
|
||||
*/
|
||||
|
||||
b {color:#000080;} /* tags */
|
||||
ins, ins b, ins s, ins em {color:gray;} /* comments */
|
||||
s, s b {color:#7777e4;} /* attribute values */
|
||||
a {color:#E67300;} /* links */
|
||||
u {color:#CC66CC;} /* forms */
|
||||
big {color:#db0000;} /* images */
|
||||
em, em b {color:#800080;} /* style */
|
||||
strong {color:#800000;} /* script */
|
||||
tt i {color:darkblue;font-weight:bold;} /* script reserved words */
|
||||
xsl {color:green;} /* xsl */
|
||||
103
ControlPanel/modules/ftp/plugins/codepress/languages/xsl.js
Normal file
103
ControlPanel/modules/ftp/plugins/codepress/languages/xsl.js
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
/*
|
||||
* CodePress regular expressions for XSL syntax highlighting
|
||||
* By RJ Bruneel
|
||||
*/
|
||||
|
||||
Language.syntax = [ // XSL
|
||||
{
|
||||
input : /(<[^!]*?>)/g,
|
||||
output : '<b>$1</b>' // all tags
|
||||
},{
|
||||
input : /(<a.*?>|<\/a>)/g,
|
||||
output : '<a>$1</a>' // links
|
||||
},{
|
||||
input : /(<img .*?>)/g,
|
||||
output : '<big>$1</big>' // images
|
||||
},{
|
||||
input : /(<\/?(button|textarea|form|input|select|option|label).*?>)/g,
|
||||
output : '<u>$1</u>' // forms
|
||||
},{
|
||||
input : /(<style.*?>)(.*?)(<\/style>)/g,
|
||||
output : '<em>$1</em><em>$2</em><em>$3</em>' // style tags
|
||||
},{
|
||||
input : /(<script.*?>)(.*?)(<\/script>)/g,
|
||||
output : '<strong>$1</strong><tt>$2</tt><strong>$3</strong>' // script tags
|
||||
},{
|
||||
input : /(<xsl.*?>|<\/xsl.*?>)/g,
|
||||
output : '<xsl>$1</xsl>' // xsl
|
||||
},{
|
||||
input : /=(".*?")/g,
|
||||
output : '=<s>$1</s>' // atributes double quote
|
||||
},{
|
||||
input : /=('.*?')/g,
|
||||
output : '=<s>$1</s>' // atributes single quote
|
||||
},{
|
||||
input : /(<!--.*?-->.)/g,
|
||||
output : '<ins>$1</ins>' // comments
|
||||
},{
|
||||
input : /\b(alert|window|document|break|continue|do|for|new|this|void|case|default|else|function|return|typeof|while|if|label|switch|var|with|catch|boolean|int|try|false|throws|null|true|goto)\b/g,
|
||||
output : '<i>$1</i>' // script reserved words
|
||||
}
|
||||
];
|
||||
|
||||
Language.snippets = [
|
||||
{input : 'aref', output : '<a href="$0"></a>' },
|
||||
{input : 'h1', output : '<h1>$0</h1>' },
|
||||
{input : 'h2', output : '<h2>$0</h2>' },
|
||||
{input : 'h3', output : '<h3>$0</h3>' },
|
||||
{input : 'h4', output : '<h4>$0</h4>' },
|
||||
{input : 'h5', output : '<h5>$0</h5>' },
|
||||
{input : 'h6', output : '<h6>$0</h6>' },
|
||||
{input : 'html', output : '<html>\n\t$0\n</html>' },
|
||||
{input : 'head', output : '<head>\n\t<meta http-equiv="content-type" content="text/html; charset=utf-8" />\n\t<title>$0</title>\n\t\n</head>' },
|
||||
{input : 'img', output : '<img src="$0" width="" height="" alt="" border="0" />' },
|
||||
{input : 'input', output : '<input name="$0" id="" type="" value="" />' },
|
||||
{input : 'label', output : '<label for="$0"></label>' },
|
||||
{input : 'legend', output : '<legend>\n\t$0\n</legend>' },
|
||||
{input : 'link', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },
|
||||
{input : 'base', output : '<base href="$0" />' },
|
||||
{input : 'body', output : '<body>\n\t$0\n</body>' },
|
||||
{input : 'css', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },
|
||||
{input : 'div', output : '<div>\n\t$0\n</div>' },
|
||||
{input : 'divid', output : '<div id="$0">\n\t\n</div>' },
|
||||
{input : 'dl', output : '<dl>\n\t<dt>\n\t\t$0\n\t</dt>\n\t<dd></dd>\n</dl>' },
|
||||
{input : 'fieldset', output : '<fieldset>\n\t$0\n</fieldset>' },
|
||||
{input : 'form', output : '<form action="$0" method="" name="">\n\t\n</form>' },
|
||||
{input : 'meta', output : '<meta name="$0" content="" />' },
|
||||
{input : 'p', output : '<p>$0</p>' },
|
||||
{input : 'b', output : '<b>$0</b>' },
|
||||
{input : 'li', output : '<li>$0</li>' },
|
||||
{input : 'ul', output : '<ul>$0</ul>' },
|
||||
{input : 'ol', output : '<ol>$0</ol>' },
|
||||
{input : 'strong', output : '<strong>$0</strong>' },
|
||||
{input : 'br', output : '<br />' },
|
||||
{input : 'script', output : '<script type="text/javascript" language="javascript" charset="utf-8">\n\t$0\t\n</script>' },
|
||||
{input : 'scriptsrc', output : '<script src="$0" type="text/javascript" language="javascript" charset="utf-8"></script>' },
|
||||
{input : 'span', output : '<span>$0</span>' },
|
||||
{input : 'table', output : '<table border="$0" cellspacing="" cellpadding="">\n\t<tr><th></th></tr>\n\t<tr><td></td></tr>\n</table>' },
|
||||
{input : 'style', output : '<style type="text/css" media="screen">\n\t$0\n</style>' },
|
||||
{input : 'xsl:stylesheet', output : '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">' },
|
||||
{input : 'xsl:template', output : '<xsl:template>$0</xsl:template>' },
|
||||
{input : 'xsl:for-each', output : '<xsl:for-each select="$0"></xsl:for-each>' },
|
||||
{input : 'xsl:choose', output : '<xsl:choose>$0<\xsl:choose>' },
|
||||
{input : 'xsl:param', output : '<xsl:param name="$0" />' },
|
||||
{input : 'xsl:variable', output : '<xsl:variable name="$0"></xsl:variable>' },
|
||||
{input : 'xsl:if', output : '<xsl:if test="$0"></xsl:if>' },
|
||||
{input : 'xsl:when', output : '<xsl:when test="$0"></xsl:when>' },
|
||||
{input : 'xsl:otherwise', output : '<xsl:otherwise>$0</xsl:otherwise>' },
|
||||
{input : 'xsl:attribute', output : '<xsl:attribute name="$0"></xsl:attribute>' },
|
||||
{input : 'xsl:value-of', output : '<xsl:value-of select="$0"/>' },
|
||||
{input : 'xsl:with-param', output : '<xsl:with-param name="$0" select="" />' },
|
||||
{input : 'xsl:call-template', output : '<xsl:call-template name="$0">' }
|
||||
|
||||
];
|
||||
|
||||
Language.complete = [ // Auto complete only for 1 character
|
||||
{input : '\'',output : '\'$0\'' },
|
||||
{input : '"', output : '"$0"' },
|
||||
{input : '(', output : '\($0\)' },
|
||||
{input : '[', output : '\[$0\]' },
|
||||
{input : '{', output : '{\n\t$0\n}' }
|
||||
];
|
||||
|
||||
Language.shortcuts = [];
|
||||
Loading…
Add table
Add a link
Reference in a new issue