# img を div で囲むやつ (元ネタは ol.rb) # div の class が img-small バージョン # imgdetail.rb と一緒に。 class Filter def imgsmall(str, type) case type when :PRE if /\A\((imgsmall)\)/ =~ str then type = $1 #
と偽って他のフィルタに通す filter(str, :DL) # タグ付け str.gsub!(/\n((?!\([\d\w]+\)).+)$/,"#{@diary.tag_br}\\1") unless @lf2br == false str.gsub!(/(?:\n|^)\([\d\w]+\)\s*(.+)(?!^\([\d\w]+\))/,"\n\\1") str.replace("
" + str + "\n
\n") # 後はそのまま出力 return :THROUGH end end end end