summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/README2
-rw-r--r--lib/coderay/helpers/plugin.rb8
-rw-r--r--lib/coderay/scanners/debug.rb1
-rw-r--r--lib/coderay/scanners/diff.rb1
-rw-r--r--lib/coderay/scanners/nitro_xhtml.rb1
-rw-r--r--lib/coderay/scanners/plaintext.rb1
-rw-r--r--lib/coderay/scanners/rhtml.rb1
7 files changed, 14 insertions, 1 deletions
diff --git a/lib/README b/lib/README
index 195dca8..bfca8a4 100644
--- a/lib/README
+++ b/lib/README
@@ -18,7 +18,7 @@ And with line numbers.
* is what everybody should have on their website
* solves all your problems and makes the girls run after you
-Version: 0.8.1
+Version: 0.9.0
Author:: murphy (Kornelius Kalnbach)
Contact:: murphy rubychan de
Website:: coderay.rubychan.de[http://coderay.rubychan.de]
diff --git a/lib/coderay/helpers/plugin.rb b/lib/coderay/helpers/plugin.rb
index 3aa79e4..922c528 100644
--- a/lib/coderay/helpers/plugin.rb
+++ b/lib/coderay/helpers/plugin.rb
@@ -281,6 +281,14 @@ module Plugin
plugin_host.register self, *ids
end
+ def title title = nil
+ if title
+ @title = title.to_s
+ else
+ @title ||= name[/([^:]+)$/, 1]
+ end
+ end
+
# The host for this Plugin class.
def plugin_host host = nil
if host and not host.is_a? PluginHost
diff --git a/lib/coderay/scanners/debug.rb b/lib/coderay/scanners/debug.rb
index ec594c1..f43564e 100644
--- a/lib/coderay/scanners/debug.rb
+++ b/lib/coderay/scanners/debug.rb
@@ -7,6 +7,7 @@ module Scanners
include Streamable
register_for :debug
file_extension 'raydebug'
+ title 'CodeRay Token Dump'
protected
def scan_tokens tokens, options
diff --git a/lib/coderay/scanners/diff.rb b/lib/coderay/scanners/diff.rb
index d52458c..bfb400b 100644
--- a/lib/coderay/scanners/diff.rb
+++ b/lib/coderay/scanners/diff.rb
@@ -4,6 +4,7 @@ module Scanners
class Diff < Scanner
register_for :diff
+ title 'diff output'
def scan_tokens tokens, options
diff --git a/lib/coderay/scanners/nitro_xhtml.rb b/lib/coderay/scanners/nitro_xhtml.rb
index 871ce17..7087ffa 100644
--- a/lib/coderay/scanners/nitro_xhtml.rb
+++ b/lib/coderay/scanners/nitro_xhtml.rb
@@ -10,6 +10,7 @@ module Scanners
include Streamable
register_for :nitro_xhtml
file_extension :xhtml
+ title 'Nitro XHTML'
NITRO_RUBY_BLOCK = /
<\?r
diff --git a/lib/coderay/scanners/plaintext.rb b/lib/coderay/scanners/plaintext.rb
index 7a08c3a..a362f0b 100644
--- a/lib/coderay/scanners/plaintext.rb
+++ b/lib/coderay/scanners/plaintext.rb
@@ -4,6 +4,7 @@ module Scanners
class Plaintext < Scanner
register_for :plaintext, :plain
+ title 'Plain text'
include Streamable
diff --git a/lib/coderay/scanners/rhtml.rb b/lib/coderay/scanners/rhtml.rb
index ca8196a..75790d8 100644
--- a/lib/coderay/scanners/rhtml.rb
+++ b/lib/coderay/scanners/rhtml.rb
@@ -9,6 +9,7 @@ module Scanners
include Streamable
register_for :rhtml
+ title 'HTML.ERB'
ERB_RUBY_BLOCK = /
<%(?!%)[=-]?