Hatena.pmを修正してシンタックスハイライトにgoogle-code-prettifyを使うように変更する

技術関係

Text::VimColorだと記事中の日本語が文字化けしたので、差し替え

設置

googlh.com - googlh リソースおよび情報
googlh.com は、あなたがお探しの情報の全ての最新かつ最適なソースです。一般トピックからここから検索できる内容は、googlh.comが全てとなります。あなたがお探しの内容が見つかることを願っています!

Text::Hatenaを修正する

$ diff Hatena.pm Hatena.pm.2011-05-31
217,220c217,219
<         # $texts = Text::VimColor->new(string => $texts,
<         #                              filetype => $filter,
<         #                             )->html;
<         $texts = HTML::Entities::encode_entities($texts, '<>&"');
---
>         $texts = Text::VimColor->new(string => $texts,
>                                      filetype => $filter,
>                                     )->html;
224c223
<     return qq!<pre class="prettyprint hatena-super-pre">\n$texts</pre>\n!;
---
>     return qq!<pre class="hatena-super-pre">\n$texts</pre>\n!;
タイトルとURLをコピーしました