trainbbcode 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/Manifest +0 -43
  2. data/Rakefile +1 -1
  3. data/lib/trainbbcode.rb +7 -4
  4. data/trainbbcode.gemspec +3 -3
  5. metadata +3 -45
  6. data/rails_generators/syntaxhighlighter/syntaxhighlighter_generator.rb +0 -30
  7. data/rails_generators/syntaxhighlighter/templates/scripts/clipboard.swf +0 -0
  8. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushAS3.js +0 -61
  9. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushBash.js +0 -66
  10. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushCSharp.js +0 -67
  11. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushColdFusion.js +0 -102
  12. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushCpp.js +0 -99
  13. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushCss.js +0 -93
  14. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushDelphi.js +0 -57
  15. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushDiff.js +0 -43
  16. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushErlang.js +0 -54
  17. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushGroovy.js +0 -69
  18. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushJScript.js +0 -52
  19. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushJava.js +0 -59
  20. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushJavaFX.js +0 -60
  21. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushPerl.js +0 -74
  22. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushPhp.js +0 -91
  23. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushPlain.js +0 -35
  24. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushPowerShell.js +0 -76
  25. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushPython.js +0 -66
  26. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushRuby.js +0 -57
  27. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushScala.js +0 -53
  28. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushSql.js +0 -68
  29. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushVb.js +0 -58
  30. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushXml.js +0 -71
  31. data/rails_generators/syntaxhighlighter/templates/scripts/shCore.js +0 -30
  32. data/rails_generators/syntaxhighlighter/templates/scripts/shLegacy.js +0 -30
  33. data/rails_generators/syntaxhighlighter/templates/src/shCore.js +0 -2077
  34. data/rails_generators/syntaxhighlighter/templates/src/shLegacy.js +0 -172
  35. data/rails_generators/syntaxhighlighter/templates/styles/help.png +0 -0
  36. data/rails_generators/syntaxhighlighter/templates/styles/magnifier.png +0 -0
  37. data/rails_generators/syntaxhighlighter/templates/styles/page_white_code.png +0 -0
  38. data/rails_generators/syntaxhighlighter/templates/styles/page_white_copy.png +0 -0
  39. data/rails_generators/syntaxhighlighter/templates/styles/printer.png +0 -0
  40. data/rails_generators/syntaxhighlighter/templates/styles/shCore.css +0 -330
  41. data/rails_generators/syntaxhighlighter/templates/styles/shThemeDefault.css +0 -173
  42. data/rails_generators/syntaxhighlighter/templates/styles/shThemeDjango.css +0 -176
  43. data/rails_generators/syntaxhighlighter/templates/styles/shThemeEclipse.css +0 -190
  44. data/rails_generators/syntaxhighlighter/templates/styles/shThemeEmacs.css +0 -175
  45. data/rails_generators/syntaxhighlighter/templates/styles/shThemeFadeToGrey.css +0 -177
  46. data/rails_generators/syntaxhighlighter/templates/styles/shThemeMidnight.css +0 -175
  47. data/rails_generators/syntaxhighlighter/templates/styles/shThemeRDark.css +0 -175
data/Manifest CHANGED
@@ -3,46 +3,3 @@ README.rdoc
3
3
  Rakefile
4
4
  init.rb
5
5
  lib/trainbbcode.rb
6
- rails_generators/syntaxhighlighter/syntaxhighlighter_generator.rb
7
- rails_generators/syntaxhighlighter/templates/scripts/clipboard.swf
8
- rails_generators/syntaxhighlighter/templates/scripts/shBrushAS3.js
9
- rails_generators/syntaxhighlighter/templates/scripts/shBrushBash.js
10
- rails_generators/syntaxhighlighter/templates/scripts/shBrushCSharp.js
11
- rails_generators/syntaxhighlighter/templates/scripts/shBrushColdFusion.js
12
- rails_generators/syntaxhighlighter/templates/scripts/shBrushCpp.js
13
- rails_generators/syntaxhighlighter/templates/scripts/shBrushCss.js
14
- rails_generators/syntaxhighlighter/templates/scripts/shBrushDelphi.js
15
- rails_generators/syntaxhighlighter/templates/scripts/shBrushDiff.js
16
- rails_generators/syntaxhighlighter/templates/scripts/shBrushErlang.js
17
- rails_generators/syntaxhighlighter/templates/scripts/shBrushGroovy.js
18
- rails_generators/syntaxhighlighter/templates/scripts/shBrushJScript.js
19
- rails_generators/syntaxhighlighter/templates/scripts/shBrushJava.js
20
- rails_generators/syntaxhighlighter/templates/scripts/shBrushJavaFX.js
21
- rails_generators/syntaxhighlighter/templates/scripts/shBrushPerl.js
22
- rails_generators/syntaxhighlighter/templates/scripts/shBrushPhp.js
23
- rails_generators/syntaxhighlighter/templates/scripts/shBrushPlain.js
24
- rails_generators/syntaxhighlighter/templates/scripts/shBrushPowerShell.js
25
- rails_generators/syntaxhighlighter/templates/scripts/shBrushPython.js
26
- rails_generators/syntaxhighlighter/templates/scripts/shBrushRuby.js
27
- rails_generators/syntaxhighlighter/templates/scripts/shBrushScala.js
28
- rails_generators/syntaxhighlighter/templates/scripts/shBrushSql.js
29
- rails_generators/syntaxhighlighter/templates/scripts/shBrushVb.js
30
- rails_generators/syntaxhighlighter/templates/scripts/shBrushXml.js
31
- rails_generators/syntaxhighlighter/templates/scripts/shCore.js
32
- rails_generators/syntaxhighlighter/templates/scripts/shLegacy.js
33
- rails_generators/syntaxhighlighter/templates/src/shCore.js
34
- rails_generators/syntaxhighlighter/templates/src/shLegacy.js
35
- rails_generators/syntaxhighlighter/templates/styles/help.png
36
- rails_generators/syntaxhighlighter/templates/styles/magnifier.png
37
- rails_generators/syntaxhighlighter/templates/styles/page_white_code.png
38
- rails_generators/syntaxhighlighter/templates/styles/page_white_copy.png
39
- rails_generators/syntaxhighlighter/templates/styles/printer.png
40
- rails_generators/syntaxhighlighter/templates/styles/shCore.css
41
- rails_generators/syntaxhighlighter/templates/styles/shThemeDefault.css
42
- rails_generators/syntaxhighlighter/templates/styles/shThemeDjango.css
43
- rails_generators/syntaxhighlighter/templates/styles/shThemeEclipse.css
44
- rails_generators/syntaxhighlighter/templates/styles/shThemeEmacs.css
45
- rails_generators/syntaxhighlighter/templates/styles/shThemeFadeToGrey.css
46
- rails_generators/syntaxhighlighter/templates/styles/shThemeMidnight.css
47
- rails_generators/syntaxhighlighter/templates/styles/shThemeRDark.css
48
- trainbbcode.gemspec
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('trainbbcode','0.3.0') do |p|
5
+ Echoe.new('trainbbcode','0.3.1') do |p|
6
6
  p.description = "Provides BBCode for Ruby."
7
7
  p.url = "http://www.arcath.net/pages/2"
8
8
  p.author = "Adam \"Arcath\" Laycock"
data/lib/trainbbcode.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  class TBBC
2
2
  def initialize
3
3
  self.conf(:configed_by => "system")
4
+ @securitykey="#{Time.now.to_i}"
4
5
  end
5
6
  def conf(config)
6
7
  require 'rubygems'
@@ -33,10 +34,10 @@ class TBBC
33
34
  @config=config
34
35
  end
35
36
  def parse(s)
36
- #CodeRay
37
- s=coderay(s)
38
37
  #Remove the < and > which will disable all HTML
39
38
  s=s.gsub("<","&lt;").gsub(">","&gt;") unless @config[:disable_html] == false
39
+ #CodeRay
40
+ s=coderay(s)
40
41
  #Convert new lines to <br />'s
41
42
  s=s.gsub(/\n/,'<br />') unless @config[:newline_enabled] == false
42
43
  #[nobbc] tags
@@ -154,8 +155,10 @@ class TBBC
154
155
  s=s.gsub(/<br \/><\/(ul|li|table|tr|td|th)/,'</\1')
155
156
  end
156
157
  def coderay(s)
157
- s.gsub(/\[code( lang="(.+?)")?\](.+?)\[\/code\]/m) do
158
- "[nobbc]" + CodeRay.scan($3, $2).div(:css => :class) + "[/nobbc]"
158
+
159
+ s.gsub(/\[code( lang=(.+?))?\](.+?)\[\/code\]/m) do
160
+ parse=$3.gsub("&lt;","<").gsub("&gt;",">")
161
+ "[nobbc]" + CodeRay.scan(parse, $2).div(:css => :class) + "[/nobbc]"
159
162
  end
160
163
  end
161
164
  end
data/trainbbcode.gemspec CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{trainbbcode}
5
- s.version = "0.3.0"
5
+ s.version = "0.3.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Adam \"Arcath\" Laycock"]
9
- s.date = %q{2010-03-29}
9
+ s.date = %q{2010-03-30}
10
10
  s.description = %q{Provides BBCode for Ruby.}
11
11
  s.email = %q{adam@arcath.net}
12
12
  s.extra_rdoc_files = ["README.rdoc", "lib/trainbbcode.rb"]
13
- s.files = ["Manifest", "README.rdoc", "Rakefile", "init.rb", "lib/trainbbcode.rb", "rails_generators/syntaxhighlighter/syntaxhighlighter_generator.rb", "rails_generators/syntaxhighlighter/templates/scripts/clipboard.swf", "rails_generators/syntaxhighlighter/templates/scripts/shBrushAS3.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushBash.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushCSharp.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushColdFusion.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushCpp.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushCss.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushDelphi.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushDiff.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushErlang.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushGroovy.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushJScript.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushJava.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushJavaFX.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushPerl.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushPhp.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushPlain.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushPowerShell.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushPython.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushRuby.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushScala.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushSql.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushVb.js", "rails_generators/syntaxhighlighter/templates/scripts/shBrushXml.js", "rails_generators/syntaxhighlighter/templates/scripts/shCore.js", "rails_generators/syntaxhighlighter/templates/scripts/shLegacy.js", "rails_generators/syntaxhighlighter/templates/src/shCore.js", "rails_generators/syntaxhighlighter/templates/src/shLegacy.js", "rails_generators/syntaxhighlighter/templates/styles/help.png", "rails_generators/syntaxhighlighter/templates/styles/magnifier.png", "rails_generators/syntaxhighlighter/templates/styles/page_white_code.png", "rails_generators/syntaxhighlighter/templates/styles/page_white_copy.png", "rails_generators/syntaxhighlighter/templates/styles/printer.png", "rails_generators/syntaxhighlighter/templates/styles/shCore.css", "rails_generators/syntaxhighlighter/templates/styles/shThemeDefault.css", "rails_generators/syntaxhighlighter/templates/styles/shThemeDjango.css", "rails_generators/syntaxhighlighter/templates/styles/shThemeEclipse.css", "rails_generators/syntaxhighlighter/templates/styles/shThemeEmacs.css", "rails_generators/syntaxhighlighter/templates/styles/shThemeFadeToGrey.css", "rails_generators/syntaxhighlighter/templates/styles/shThemeMidnight.css", "rails_generators/syntaxhighlighter/templates/styles/shThemeRDark.css", "trainbbcode.gemspec"]
13
+ s.files = ["README.rdoc", "Rakefile", "init.rb", "lib/trainbbcode.rb", "Manifest", "trainbbcode.gemspec"]
14
14
  s.homepage = %q{http://www.arcath.net/pages/2}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Trainbbcode", "--main", "README.rdoc"]
16
16
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trainbbcode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam "Arcath" Laycock
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-03-29 00:00:00 +01:00
12
+ date: 2010-03-30 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -32,53 +32,11 @@ extra_rdoc_files:
32
32
  - README.rdoc
33
33
  - lib/trainbbcode.rb
34
34
  files:
35
- - Manifest
36
35
  - README.rdoc
37
36
  - Rakefile
38
37
  - init.rb
39
38
  - lib/trainbbcode.rb
40
- - rails_generators/syntaxhighlighter/syntaxhighlighter_generator.rb
41
- - rails_generators/syntaxhighlighter/templates/scripts/clipboard.swf
42
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushAS3.js
43
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushBash.js
44
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushCSharp.js
45
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushColdFusion.js
46
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushCpp.js
47
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushCss.js
48
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushDelphi.js
49
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushDiff.js
50
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushErlang.js
51
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushGroovy.js
52
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushJScript.js
53
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushJava.js
54
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushJavaFX.js
55
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushPerl.js
56
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushPhp.js
57
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushPlain.js
58
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushPowerShell.js
59
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushPython.js
60
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushRuby.js
61
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushScala.js
62
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushSql.js
63
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushVb.js
64
- - rails_generators/syntaxhighlighter/templates/scripts/shBrushXml.js
65
- - rails_generators/syntaxhighlighter/templates/scripts/shCore.js
66
- - rails_generators/syntaxhighlighter/templates/scripts/shLegacy.js
67
- - rails_generators/syntaxhighlighter/templates/src/shCore.js
68
- - rails_generators/syntaxhighlighter/templates/src/shLegacy.js
69
- - rails_generators/syntaxhighlighter/templates/styles/help.png
70
- - rails_generators/syntaxhighlighter/templates/styles/magnifier.png
71
- - rails_generators/syntaxhighlighter/templates/styles/page_white_code.png
72
- - rails_generators/syntaxhighlighter/templates/styles/page_white_copy.png
73
- - rails_generators/syntaxhighlighter/templates/styles/printer.png
74
- - rails_generators/syntaxhighlighter/templates/styles/shCore.css
75
- - rails_generators/syntaxhighlighter/templates/styles/shThemeDefault.css
76
- - rails_generators/syntaxhighlighter/templates/styles/shThemeDjango.css
77
- - rails_generators/syntaxhighlighter/templates/styles/shThemeEclipse.css
78
- - rails_generators/syntaxhighlighter/templates/styles/shThemeEmacs.css
79
- - rails_generators/syntaxhighlighter/templates/styles/shThemeFadeToGrey.css
80
- - rails_generators/syntaxhighlighter/templates/styles/shThemeMidnight.css
81
- - rails_generators/syntaxhighlighter/templates/styles/shThemeRDark.css
39
+ - Manifest
82
40
  - trainbbcode.gemspec
83
41
  has_rdoc: true
84
42
  homepage: http://www.arcath.net/pages/2
@@ -1,30 +0,0 @@
1
- class SyntaxhighlighterGenerator < Rails::Generator::Base
2
- def manifest
3
- record do |m|
4
- #Style Files
5
- m.directory "public/styles"
6
- m.file "styles/help.png", "public/styles/help.png"
7
- m.file "styles/magnifier.png", "public/styles/magnifier.png"
8
- m.file "styles/page_white_code.png", "public/styles/page_white_code.png"
9
- m.file "styles/page_white_copy.png", "public/styles/page_white_copy.png"
10
- m.file "styles/printer.png", "public/styles/printer.png"
11
- m.directory "public/stylesheets/syntax"
12
- m.file "styles/shCore.css", "public/stylesheets/syntax/shCore.css"
13
- m.file "styles/shThemeDefault.css", "public/stylesheets/syntax/shThemeDefault.css"
14
- m.file "styles/shThemeDjango.css", "public/stylesheets/syntax/shThemeDjango.css"
15
- m.file "styles/shThemeEclipse.css", "public/stylesheets/syntax/shThemeEclipse.css"
16
- m.file "styles/shThemeEmacs.css", "public/stylesheets/syntax/shThemeEmacs.css"
17
- m.file "styles/shThemeFadeToGrey.css", "public/stylesheets/syntax/shThemeFadeToGrey.css"
18
- m.file "styles/shThemeMidnight.css", "public/stylesheets/syntax/shThemeMidnight.css"
19
- m.file "styles/shThemeRDark.css", "public/stylesheets/syntax/shThemeRDark.css"
20
- #Src Files
21
- m.directory "public/javascripts/syntax"
22
- m.file "src/shCore.js", "public/javascripts/syntax/shCore.js"
23
- m.file "src/shLegacy.js", "public/javascripts/syntax/shLegacy.js"
24
- #Script Files
25
- Dir.foreach("vendor/plugins/TrainBBCode/rails_generators/syntaxhighlighter/templates/scripts") do |f|
26
- m.file "scripts/#{f}", "public/javascripts/syntax/#{f}"
27
- end
28
- end
29
- end
30
- end
@@ -1,61 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
7
- *
8
- * @version
9
- * 2.1.364 (October 15 2009)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2009 Alex Gorbatchev.
13
- *
14
- * @license
15
- * This file is part of SyntaxHighlighter.
16
- *
17
- * SyntaxHighlighter is free software: you can redistribute it and/or modify
18
- * it under the terms of the GNU Lesser General Public License as published by
19
- * the Free Software Foundation, either version 3 of the License, or
20
- * (at your option) any later version.
21
- *
22
- * SyntaxHighlighter is distributed in the hope that it will be useful,
23
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
- * GNU General Public License for more details.
26
- *
27
- * You should have received a copy of the GNU General Public License
28
- * along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
29
- */
30
- SyntaxHighlighter.brushes.AS3 = function()
31
- {
32
- // Created by Peter Atoria @ http://iAtoria.com
33
-
34
- var inits = 'class interface function package';
35
-
36
- var keywords = '-Infinity ...rest Array as AS3 Boolean break case catch const continue Date decodeURI ' +
37
- 'decodeURIComponent default delete do dynamic each else encodeURI encodeURIComponent escape ' +
38
- 'extends false final finally flash_proxy for get if implements import in include Infinity ' +
39
- 'instanceof int internal is isFinite isNaN isXMLName label namespace NaN native new null ' +
40
- 'Null Number Object object_proxy override parseFloat parseInt private protected public ' +
41
- 'return set static String super switch this throw true try typeof uint undefined unescape ' +
42
- 'use void while with'
43
- ;
44
-
45
- this.regexList = [
46
- { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
47
- { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
48
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
49
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
50
- { regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers
51
- { regex: new RegExp(this.getKeywords(inits), 'gm'), css: 'color3' }, // initializations
52
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
53
- { regex: new RegExp('var', 'gm'), css: 'variable' }, // variable
54
- { regex: new RegExp('trace', 'gm'), css: 'color1' } // trace
55
- ];
56
-
57
- this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);
58
- };
59
-
60
- SyntaxHighlighter.brushes.AS3.prototype = new SyntaxHighlighter.Highlighter();
61
- SyntaxHighlighter.brushes.AS3.aliases = ['actionscript3', 'as3'];
@@ -1,66 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
7
- *
8
- * @version
9
- * 2.1.364 (October 15 2009)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2009 Alex Gorbatchev.
13
- *
14
- * @license
15
- * This file is part of SyntaxHighlighter.
16
- *
17
- * SyntaxHighlighter is free software: you can redistribute it and/or modify
18
- * it under the terms of the GNU Lesser General Public License as published by
19
- * the Free Software Foundation, either version 3 of the License, or
20
- * (at your option) any later version.
21
- *
22
- * SyntaxHighlighter is distributed in the hope that it will be useful,
23
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
- * GNU General Public License for more details.
26
- *
27
- * You should have received a copy of the GNU General Public License
28
- * along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
29
- */
30
- SyntaxHighlighter.brushes.Bash = function()
31
- {
32
- var keywords = 'if fi then elif else for do done until while break continue case function return in eq ne gt lt ge le';
33
- var commands = 'alias apropos awk basename bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot' +
34
- 'cksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df ' +
35
- 'diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval ' +
36
- 'exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format ' +
37
- 'free fsck ftp gawk getopts grep groups gzip hash head history hostname id ifconfig ' +
38
- 'import install join kill less let ln local locate logname logout look lpc lpr lprint ' +
39
- 'lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools ' +
40
- 'mv netstat nice nl nohup nslookup open op passwd paste pathchk ping popd pr printcap ' +
41
- 'printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice ' +
42
- 'remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown ' +
43
- 'sleep sort source split ssh strace su sudo sum symlink sync tail tar tee test time ' +
44
- 'times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias ' +
45
- 'uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir ' +
46
- 'vi watch wc whereis which who whoami Wget xargs yes'
47
- ;
48
-
49
- this.findMatches = function(regexList, code)
50
- {
51
- code = code.replace(/&gt;/g, '>').replace(/&lt;/g, '<');
52
- this.code = code;
53
- return SyntaxHighlighter.Highlighter.prototype.findMatches.apply(this, [regexList, code]);
54
- };
55
-
56
- this.regexList = [
57
- { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments
58
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
59
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
60
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
61
- { regex: new RegExp(this.getKeywords(commands), 'gm'), css: 'functions' } // commands
62
- ];
63
- }
64
-
65
- SyntaxHighlighter.brushes.Bash.prototype = new SyntaxHighlighter.Highlighter();
66
- SyntaxHighlighter.brushes.Bash.aliases = ['bash', 'shell'];
@@ -1,67 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
7
- *
8
- * @version
9
- * 2.1.364 (October 15 2009)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2009 Alex Gorbatchev.
13
- *
14
- * @license
15
- * This file is part of SyntaxHighlighter.
16
- *
17
- * SyntaxHighlighter is free software: you can redistribute it and/or modify
18
- * it under the terms of the GNU Lesser General Public License as published by
19
- * the Free Software Foundation, either version 3 of the License, or
20
- * (at your option) any later version.
21
- *
22
- * SyntaxHighlighter is distributed in the hope that it will be useful,
23
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
- * GNU General Public License for more details.
26
- *
27
- * You should have received a copy of the GNU General Public License
28
- * along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
29
- */
30
- SyntaxHighlighter.brushes.CSharp = function()
31
- {
32
- var keywords = 'abstract as base bool break byte case catch char checked class const ' +
33
- 'continue decimal default delegate do double else enum event explicit ' +
34
- 'extern false finally fixed float for foreach get goto if implicit in int ' +
35
- 'interface internal is lock long namespace new null object operator out ' +
36
- 'override params private protected public readonly ref return sbyte sealed set ' +
37
- 'short sizeof stackalloc static string struct switch this throw true try ' +
38
- 'typeof uint ulong unchecked unsafe ushort using virtual void while';
39
-
40
- function fixComments(match, regexInfo)
41
- {
42
- var css = (match[0].indexOf("///") == 0)
43
- ? 'color1'
44
- : 'comments'
45
- ;
46
-
47
- return [new SyntaxHighlighter.Match(match[0], match.index, css)];
48
- }
49
-
50
- this.regexList = [
51
- { regex: SyntaxHighlighter.regexLib.singleLineCComments, func : fixComments }, // one line comments
52
- { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
53
- { regex: /@"(?:[^"]|"")*"/g, css: 'string' }, // @-quoted strings
54
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
55
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
56
- { regex: /^\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
57
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // c# keyword
58
- { regex: /\bpartial(?=\s+(?:class|interface|struct)\b)/g, css: 'keyword' }, // contextual keyword: 'partial'
59
- { regex: /\byield(?=\s+(?:return|break)\b)/g, css: 'keyword' } // contextual keyword: 'yield'
60
- ];
61
-
62
- this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
63
- };
64
-
65
- SyntaxHighlighter.brushes.CSharp.prototype = new SyntaxHighlighter.Highlighter();
66
- SyntaxHighlighter.brushes.CSharp.aliases = ['c#', 'c-sharp', 'csharp'];
67
-
@@ -1,102 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
7
- *
8
- * @version
9
- * 2.1.364 (October 15 2009)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2009 Alex Gorbatchev.
13
- *
14
- * @license
15
- * This file is part of SyntaxHighlighter.
16
- *
17
- * SyntaxHighlighter is free software: you can redistribute it and/or modify
18
- * it under the terms of the GNU Lesser General Public License as published by
19
- * the Free Software Foundation, either version 3 of the License, or
20
- * (at your option) any later version.
21
- *
22
- * SyntaxHighlighter is distributed in the hope that it will be useful,
23
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
- * GNU General Public License for more details.
26
- *
27
- * You should have received a copy of the GNU General Public License
28
- * along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
29
- */
30
- SyntaxHighlighter.brushes.ColdFusion = function()
31
- {
32
- // Contributed by Jen
33
- // http://www.jensbits.com/2009/05/14/coldfusion-brush-for-syntaxhighlighter-plus
34
-
35
- var funcs = 'Abs ACos AddSOAPRequestHeader AddSOAPResponseHeader AjaxLink AjaxOnLoad ArrayAppend ArrayAvg ArrayClear ArrayDeleteAt ' +
36
- 'ArrayInsertAt ArrayIsDefined ArrayIsEmpty ArrayLen ArrayMax ArrayMin ArraySet ArraySort ArraySum ArraySwap ArrayToList ' +
37
- 'Asc ASin Atn BinaryDecode BinaryEncode BitAnd BitMaskClear BitMaskRead BitMaskSet BitNot BitOr BitSHLN BitSHRN BitXor ' +
38
- 'Ceiling CharsetDecode CharsetEncode Chr CJustify Compare CompareNoCase Cos CreateDate CreateDateTime CreateObject ' +
39
- 'CreateODBCDate CreateODBCDateTime CreateODBCTime CreateTime CreateTimeSpan CreateUUID DateAdd DateCompare DateConvert ' +
40
- 'DateDiff DateFormat DatePart Day DayOfWeek DayOfWeekAsString DayOfYear DaysInMonth DaysInYear DE DecimalFormat DecrementValue ' +
41
- 'Decrypt DecryptBinary DeleteClientVariable DeserializeJSON DirectoryExists DollarFormat DotNetToCFType Duplicate Encrypt ' +
42
- 'EncryptBinary Evaluate Exp ExpandPath FileClose FileCopy FileDelete FileExists FileIsEOF FileMove FileOpen FileRead ' +
43
- 'FileReadBinary FileReadLine FileSetAccessMode FileSetAttribute FileSetLastModified FileWrite Find FindNoCase FindOneOf ' +
44
- 'FirstDayOfMonth Fix FormatBaseN GenerateSecretKey GetAuthUser GetBaseTagData GetBaseTagList GetBaseTemplatePath ' +
45
- 'GetClientVariablesList GetComponentMetaData GetContextRoot GetCurrentTemplatePath GetDirectoryFromPath GetEncoding ' +
46
- 'GetException GetFileFromPath GetFileInfo GetFunctionList GetGatewayHelper GetHttpRequestData GetHttpTimeString ' +
47
- 'GetK2ServerDocCount GetK2ServerDocCountLimit GetLocale GetLocaleDisplayName GetLocalHostIP GetMetaData GetMetricData ' +
48
- 'GetPageContext GetPrinterInfo GetProfileSections GetProfileString GetReadableImageFormats GetSOAPRequest GetSOAPRequestHeader ' +
49
- 'GetSOAPResponse GetSOAPResponseHeader GetTempDirectory GetTempFile GetTemplatePath GetTickCount GetTimeZoneInfo GetToken ' +
50
- 'GetUserRoles GetWriteableImageFormats Hash Hour HTMLCodeFormat HTMLEditFormat IIf ImageAddBorder ImageBlur ImageClearRect ' +
51
- 'ImageCopy ImageCrop ImageDrawArc ImageDrawBeveledRect ImageDrawCubicCurve ImageDrawLine ImageDrawLines ImageDrawOval ' +
52
- 'ImageDrawPoint ImageDrawQuadraticCurve ImageDrawRect ImageDrawRoundRect ImageDrawText ImageFlip ImageGetBlob ImageGetBufferedImage ' +
53
- 'ImageGetEXIFTag ImageGetHeight ImageGetIPTCTag ImageGetWidth ImageGrayscale ImageInfo ImageNegative ImageNew ImageOverlay ImagePaste ' +
54
- 'ImageRead ImageReadBase64 ImageResize ImageRotate ImageRotateDrawingAxis ImageScaleToFit ImageSetAntialiasing ImageSetBackgroundColor ' +
55
- 'ImageSetDrawingColor ImageSetDrawingStroke ImageSetDrawingTransparency ImageSharpen ImageShear ImageShearDrawingAxis ImageTranslate ' +
56
- 'ImageTranslateDrawingAxis ImageWrite ImageWriteBase64 ImageXORDrawingMode IncrementValue InputBaseN Insert Int IsArray IsBinary ' +
57
- 'IsBoolean IsCustomFunction IsDate IsDDX IsDebugMode IsDefined IsImage IsImageFile IsInstanceOf IsJSON IsLeapYear IsLocalHost ' +
58
- 'IsNumeric IsNumericDate IsObject IsPDFFile IsPDFObject IsQuery IsSimpleValue IsSOAPRequest IsStruct IsUserInAnyRole IsUserInRole ' +
59
- 'IsUserLoggedIn IsValid IsWDDX IsXML IsXmlAttribute IsXmlDoc IsXmlElem IsXmlNode IsXmlRoot JavaCast JSStringFormat LCase Left Len ' +
60
- 'ListAppend ListChangeDelims ListContains ListContainsNoCase ListDeleteAt ListFind ListFindNoCase ListFirst ListGetAt ListInsertAt ' +
61
- 'ListLast ListLen ListPrepend ListQualify ListRest ListSetAt ListSort ListToArray ListValueCount ListValueCountNoCase LJustify Log ' +
62
- 'Log10 LSCurrencyFormat LSDateFormat LSEuroCurrencyFormat LSIsCurrency LSIsDate LSIsNumeric LSNumberFormat LSParseCurrency LSParseDateTime ' +
63
- 'LSParseEuroCurrency LSParseNumber LSTimeFormat LTrim Max Mid Min Minute Month MonthAsString Now NumberFormat ParagraphFormat ParseDateTime ' +
64
- 'Pi PrecisionEvaluate PreserveSingleQuotes Quarter QueryAddColumn QueryAddRow QueryConvertForGrid QueryNew QuerySetCell QuotedValueList Rand ' +
65
- 'Randomize RandRange REFind REFindNoCase ReleaseComObject REMatch REMatchNoCase RemoveChars RepeatString Replace ReplaceList ReplaceNoCase ' +
66
- 'REReplace REReplaceNoCase Reverse Right RJustify Round RTrim Second SendGatewayMessage SerializeJSON SetEncoding SetLocale SetProfileString ' +
67
- 'SetVariable Sgn Sin Sleep SpanExcluding SpanIncluding Sqr StripCR StructAppend StructClear StructCopy StructCount StructDelete StructFind ' +
68
- 'StructFindKey StructFindValue StructGet StructInsert StructIsEmpty StructKeyArray StructKeyExists StructKeyList StructKeyList StructNew ' +
69
- 'StructSort StructUpdate Tan TimeFormat ToBase64 ToBinary ToScript ToString Trim UCase URLDecode URLEncodedFormat URLSessionFormat Val ' +
70
- 'ValueList VerifyClient Week Wrap Wrap WriteOutput XmlChildPos XmlElemNew XmlFormat XmlGetNodeType XmlNew XmlParse XmlSearch XmlTransform ' +
71
- 'XmlValidate Year YesNoFormat';
72
-
73
- var keywords = 'cfabort cfajaximport cfajaxproxy cfapplet cfapplication cfargument cfassociate cfbreak cfcache cfcalendar ' +
74
- 'cfcase cfcatch cfchart cfchartdata cfchartseries cfcol cfcollection cfcomponent cfcontent cfcookie cfdbinfo ' +
75
- 'cfdefaultcase cfdirectory cfdiv cfdocument cfdocumentitem cfdocumentsection cfdump cfelse cfelseif cferror ' +
76
- 'cfexchangecalendar cfexchangeconnection cfexchangecontact cfexchangefilter cfexchangemail cfexchangetask ' +
77
- 'cfexecute cfexit cffeed cffile cfflush cfform cfformgroup cfformitem cfftp cffunction cfgrid cfgridcolumn ' +
78
- 'cfgridrow cfgridupdate cfheader cfhtmlhead cfhttp cfhttpparam cfif cfimage cfimport cfinclude cfindex ' +
79
- 'cfinput cfinsert cfinterface cfinvoke cfinvokeargument cflayout cflayoutarea cfldap cflocation cflock cflog ' +
80
- 'cflogin cfloginuser cflogout cfloop cfmail cfmailparam cfmailpart cfmenu cfmenuitem cfmodule cfNTauthenticate ' +
81
- 'cfobject cfobjectcache cfoutput cfparam cfpdf cfpdfform cfpdfformparam cfpdfparam cfpdfsubform cfpod cfpop ' +
82
- 'cfpresentation cfpresentationslide cfpresenter cfprint cfprocessingdirective cfprocparam cfprocresult ' +
83
- 'cfproperty cfquery cfqueryparam cfregistry cfreport cfreportparam cfrethrow cfreturn cfsavecontent cfschedule ' +
84
- 'cfscript cfsearch cfselect cfset cfsetting cfsilent cfslider cfsprydataset cfstoredproc cfswitch cftable ' +
85
- 'cftextarea cfthread cfthrow cftimer cftooltip cftrace cftransaction cftree cftreeitem cftry cfupdate cfwddx ' +
86
- 'cfwindow cfxml cfzip cfzipparam';
87
-
88
- var operators = 'all and any between cross in join like not null or outer some';
89
-
90
- this.regexList = [
91
- { regex: new RegExp('--(.*)$', 'gm'), css: 'comments' }, // one line and multiline comments
92
- { regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // single quoted strings
93
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
94
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
95
- { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // functions
96
- { regex: new RegExp(this.getKeywords(operators), 'gmi'), css: 'color1' }, // operators and such
97
- { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
98
- ];
99
- }
100
-
101
- SyntaxHighlighter.brushes.ColdFusion.prototype = new SyntaxHighlighter.Highlighter();
102
- SyntaxHighlighter.brushes.ColdFusion.aliases = ['coldfusion','cf'];