From 26a8e5a0388199ac686db28d631b05a5b5aa02e1 Mon Sep 17 00:00:00 2001 From: murphy Date: Tue, 11 Jul 2006 05:37:50 +0000 Subject: Changed error handling of all scanners: :error tokens are OK now, even in debug mode, but token kind is nil unless assigned. Small fixes for C and Ruby scanners. Renamed local variable type to kind in Ruby scanner. Improved RHTML scanner to recognize -%> as delimiter. HTML encoder: improved handling of malformed token strings. Fixed PluginHost#inspect including docu. Scanner#raise_inspect also shows state if given. --- lib/coderay/helpers/plugin.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/coderay/helpers/plugin.rb') diff --git a/lib/coderay/helpers/plugin.rb b/lib/coderay/helpers/plugin.rb index 7e90279..742717d 100644 --- a/lib/coderay/helpers/plugin.rb +++ b/lib/coderay/helpers/plugin.rb @@ -168,6 +168,15 @@ module PluginHost end end + # Makes a map of all loaded plugins. + def inspect + map = plugin_hash.dup + map.each do |id, plugin| + map[id] = plugin.to_s[/(?>[\w_]+)$/] + end + "#{name}[#{host_id}]#{map.inspect}" + end + protected # Created a new plugin list and stores it to @plugin_hash. def create_plugin_hash @@ -194,15 +203,6 @@ protected end end - # Makes a map of all loaded scanners. - def inspect - map = plugin_hash.dup - map.each do |id, plugin| - map[id] = plugin.name[/(?>[\w_]+)$/] - end - map.inspect - end - # Loads the map file (see map). # # This is done automatically when plugin_path is called. -- cgit v1.2.1