public
Description: A fork of CyBot (http://repo.or.cz/w/six.git)
Homepage: http://wiki.macromates.com/Cybot/Cybot
Clone URL: git://github.com/kballard/six.git
Fix documentation URLs returned.

Also strip fragment part of a URL when it is identical to the page name, 
e.g. http://manual.macromates.com/en/language_grammars#language_grammars.
Allan Odgaard (author)
Wed Jun 11 14:12:25 -0700 2008
commit  2b6f957834bda56a67ae5da9c1b8ff976f3bc35d
tree    df844dd389557bfc9d4c83f1dfc971d56e2ac435
parent  986dea0dbe6c5d3df92a329b56f017c1b7698976
...
27
28
29
30
 
31
32
33
...
81
82
83
84
 
85
86
87
...
27
28
29
 
30
31
32
33
...
81
82
83
 
84
85
86
87
0
@@ -27,7 +27,7 @@ end if $0 == __FILE__
0
 
0
 module TMHelper
0
   module_function
0
-
0
+
0
   def phrase_to_keywords(phrase)
0
     phrase.gsub(/\b(\w+)s\b/, '\1').downcase.split(/\W/).to_set
0
   end
0
@@ -81,7 +81,7 @@ class Textmate < PluginBase
0
       TMHelper.call_with_body(irc, 'http://manual.macromates.com/en/') do |body|
0
         toc = body.scan(%r{<li>\s*([\d.]+)\s*<a href=['"](.*?)['"]>(.*?)</a>})
0
         entries = toc.map do |e|
0
- { :link => 'http://manual.macromates.com/en/#' + e[1],
0
+ { :link => 'http://manual.macromates.com/en/' + e[1].gsub(/^([^#]+)#\1$/, '\1'),
0
             :title => e[2].gsub(%r{</?\w+>}, '')
0
           }
0
         end

Comments

    No one has commented yet.