mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-21 04:09:55 +09:00
code_highlighter(edit component) 업데이트
- dp.SyntaxHighlighter 1.4에서 1.5.1로 업데이트 (통째로 덮어 씌움..) - Abap 언어 추가. - 접기/줄 번호 감추기/도구바 감추기 설정 추가. git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3104 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
12f685e116
commit
f490cad881
21 changed files with 1090 additions and 578 deletions
|
|
@ -1,26 +1,11 @@
|
|||
/* Ruby 1.8.4 syntax contributed by Erik Peterson */
|
||||
dp.sh.Brushes.Ruby = function()
|
||||
{
|
||||
var keywords = 'alias and BEGIN begin break case class def define_method defined do each else elsif ' +
|
||||
'END end ensure false for if in module new next nil not or raise redo rescue retry return ' +
|
||||
'self super then throw true undef unless until when while yield';
|
||||
/*
|
||||
* JsMin
|
||||
* Javascript Compressor
|
||||
* http://www.crockford.com/
|
||||
* http://www.smallsharptools.com/
|
||||
*/
|
||||
|
||||
var builtins = 'Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload ' +
|
||||
'Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ' +
|
||||
'ThreadGroup Thread Time TrueClass'
|
||||
|
||||
this.regexList = [
|
||||
{ regex: dp.sh.RegexLib.SingleLinePerlComments, css: 'dp-comment' }, // one line comments
|
||||
{ regex: dp.sh.RegexLib.DoubleQuotedString, css: 'dp-string' }, // double quoted strings
|
||||
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'dp-string' }, // single quoted strings
|
||||
{ regex: new RegExp(':[a-z][A-Za-z0-9_]*', 'g'), css: 'dp-symbol' }, // symbols
|
||||
{ regex: new RegExp('[\\$|@|@@]\\w+', 'g'), css: 'dp-variable' }, // $global, @instance, and @@class variables
|
||||
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'dp-keyword' }, // keywords
|
||||
{ regex: new RegExp(this.GetKeywords(builtins), 'gm'), css: 'dp-builtin' } // builtins
|
||||
];
|
||||
|
||||
this.CssClass = 'dp-rb';
|
||||
}
|
||||
|
||||
dp.sh.Brushes.Ruby.prototype = new dp.sh.Highlighter();
|
||||
dp.sh.Brushes.Ruby.Aliases = ['ruby', 'rails'];
|
||||
dp.sh.Brushes.Ruby=function()
|
||||
{var keywords='alias and BEGIN begin break case class def define_method defined do each else elsif '+'END end ensure false for if in module new next nil not or raise redo rescue retry return '+'self super then throw true undef unless until when while yield';var builtins='Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload '+'Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol '+'ThreadGroup Thread Time TrueClass'
|
||||
this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp(':[a-z][A-Za-z0-9_]*','g'),css:'symbol'},{regex:new RegExp('(\\$|@@|@)\\w+','g'),css:'variable'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'},{regex:new RegExp(this.GetKeywords(builtins),'gm'),css:'builtin'}];this.CssClass='dp-rb';this.Style='.dp-rb .symbol { color: #a70; }'+'.dp-rb .variable { color: #a70; font-weight: bold; }';}
|
||||
dp.sh.Brushes.Ruby.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Ruby.Aliases=['ruby','rails','ror'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue