最終更新: 2013-09-14T00:17+0900
使えないのを知
これを HTML化するのは意外と簡単。プラグインでできる。
add_title_proc {|date, title| if title.index('<') title.sub(/<span class="title">([^<>]+)<\/span>/){ %/<div class="title">#{WikiSection.new(CGI.unescapeHTML $1).body_to_html}<\/div>/ } else WikiSection.new(CGI.unescapeHTML title).body_to_html end }
今日のタイトルに含まれる「==日記==ブログ」という部分があまりにわかりにくか
勘違い発覚。Headingがブロ
修正。
add_title_proc {|date, title| inline_or_nil = lambda{|src| lines = src.split(/\r?\n/) return nil if 1 < lines.length html = WikiSection.new(lines.first).body_to_html return nil if html[0,3] != '<p>' or html[-4,4] != '</p>' return html } if title.index('<') title.sub(/<span class="title">([^<>]+)<\/span>/){|_0| html = inline_or_nil.call(CGI.unescapeHTML $1) html ? %/<span class="title">#{html}<\/span>/ : _0 } else inline_or_nil.call(CGI.unescapeHTML title) or title end rescue title }
それなりにチ