Changeset 1778
- Timestamp:
- 10/18/06 18:29:20
- Files:
-
- trunk/plagger/lib/Plagger/Plugin/Summary/Simple.pm (modified) (1 diff)
- trunk/plagger/t/plugins/Summary-Simple/base.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plagger/lib/Plagger/Plugin/Summary/Simple.pm
r1741 r1778 33 33 } 34 34 } else { 35 # text: substring with 255 bytes 35 # text: strip until the ending dots 36 # TODO: make this 255 configurable? 37 if ($text =~ /^(.+?(\x{3002}|\.\s))/ && length($1) <= 255) { 38 (my $summary = $1) =~ s/\s*$//; 39 return $summary; 40 } 41 36 42 if (length($text) > 255) { 37 43 return substr($text, 0, 255) . "..."; trunk/plagger/t/plugins/Summary-Simple/base.t
r1741 r1778 1 1 use strict; 2 use utf8; 2 3 use t::TestPlagger; 3 4 … … 80 81 --- expected 81 82 <p>First paragraph</p> 83 84 === I18N. Japanese plaintext 85 --- input 86 Shibuya Perl Mongers は東京地区とくに渋谷周辺のインターネット関連企業に勤務している Perl ユーザのコミュニティ形成を目指す非営利の団体です。主な活動内容はプログラミング言語 Perl に関係するメンバー主催の勉強会やインターネット上での啓蒙活動や情報交換です。Shibuya Perl Mongers は Perl を利用し、スキル向上を望む方であればどなたでも無料で参加できます。 87 --- expected 88 Shibuya Perl Mongers は東京地区とくに渋谷周辺のインターネット関連企業に勤務している Perl ユーザのコミュニティ形成を目指す非営利の団体です。 89 90 === English plaintext 91 --- input 92 There'll be the Web 2.0 Conference in San Francisco. blah blah blah. 93 --- expected 94 There'll be the Web 2.0 Conference in San Francisco.
