# # title-link.rb: make permalink include all of title. $Revision: 1.3 $ # # Copyright (C) 2005 TADA Tadashi # You can redistribute it and/or modify it under GPL2. # def title_of_day( date, title ) if respond_to?( :blog_category ) then cats, stripped = title.scan( /^((?:\[[^\]]+\])+)\s*(.*)/ )[0] unless cats then cats = '' stripped = title else cats << ' ' end else cats = '' stripped = title end r = <<-HTML #{cats} HTML if @mode == 'day' then r << stripped else r << %Q[#{stripped}] end r << "" return r.gsub( /^\t+/, '' ).chomp end # Local Variables: # mode: ruby # indent-tabs-mode: t # tab-width: 3 # ruby-indent-level: 3 # End: