- Timestamp:
- 01/28/08 20:10:16 (5 years ago)
- Files:
-
- 1 modified
-
platform/tdiary/lib/bayes.rb (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
platform/tdiary/lib/bayes.rb
r5509 r5703 3 3 4 4 require "pstore" 5 require "uri" 5 6 6 7 module Bayes … … 84 85 85 86 h = host 86 while /^(.*?)[ \.\-_](.*)$/=~h87 while /^(.*?)[._-](.*)$/=~h 87 88 h = $2 88 89 push($1, prefix) … … 94 95 95 96 def add_url(url, prefix=nil) 96 if %r[^(?:https?|ftp)://(.*?)(?::\d+)?/(.*?)\/?(\?.*)?$] =~ url 97 host = $1 98 path = $2 97 if URI.regexp(%w[http https ftp]) === url 98 url = URI.parse url 99 host = url.host # $4 100 path = url.path.gsub(%r{^/+|/+$}, '') # $7 99 101 100 102 add_host(host, prefix) … … 104 106 105 107 p = path 106 re = %r[^(.*)[/ \-\._](.*?)$]108 re = %r[^(.*)[/._-](.*?)$] 107 109 while re=~p 108 110 p = $1
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)