[MKDoc-commit] [MKDoc::Text::Structured] sp.

bruno at mkdoc.demon.co.uk bruno at mkdoc.demon.co.uk
Fri Aug 5 12:27:52 BST 2005


Log Message:
-----------
[MKDoc::Text::Structured] sp. smiley (singular) and smilies (plural)

Modified Files:
--------------
    MKDoc-Text-Structured/lib/MKDoc/Text:
        Structured.pm
    MKDoc-Text-Structured/lib/MKDoc/Text/Structured:
        Inline.pm
    MKDoc-Text-Structured/t:
        021_smilies.t

-------------- next part --------------
Index: Structured.pm
===================================================================
RCS file: /var/spool/cvs/MKDoc-Text-Structured/lib/MKDoc/Text/Structured.pm,v
retrieving revision 1.27
retrieving revision 1.28
diff -Llib/MKDoc/Text/Structured.pm -Llib/MKDoc/Text/Structured.pm -u -r1.27 -r1.28
--- lib/MKDoc/Text/Structured.pm
+++ lib/MKDoc/Text/Structured.pm
@@ -319,8 +319,8 @@
 
 Basic smilies such as :-) and :-( are wrapped in a CSS class:
 
-  <span class="smilie-happy">:-)</span>
-  <span class="smilie-sad">:-(</span>
+  <span class="smiley-happy">:-)</span>
+  <span class="smiley-sad">:-(</span>
 
 =head1 Long Words
 
Index: Inline.pm
===================================================================
RCS file: /var/spool/cvs/MKDoc-Text-Structured/lib/MKDoc/Text/Structured/Inline.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -Llib/MKDoc/Text/Structured/Inline.pm -Llib/MKDoc/Text/Structured/Inline.pm -u -r1.15 -r1.16
--- lib/MKDoc/Text/Structured/Inline.pm
+++ lib/MKDoc/Text/Structured/Inline.pm
@@ -276,8 +276,8 @@
 {
     $Text = join '', map {
 	my $stuff = $_;
-        $stuff =~ s/:-\)/<span class="smilie-happy">:-)<\/span>/g unless ($stuff =~ /^</);
-        $stuff =~ s/:-\(/<span class="smilie-sad">:-(<\/span>/g unless ($stuff =~ /^</);
+        $stuff =~ s/:-\)/<span class="smiley-happy">:-)<\/span>/g unless ($stuff =~ /^</);
+        $stuff =~ s/:-\(/<span class="smiley-sad">:-(<\/span>/g unless ($stuff =~ /^</);
         # don't do ;-) think about what happens with &-)
         $stuff;
     } _tokenize ($Text);
Index: 021_smilies.t
===================================================================
RCS file: /var/spool/cvs/MKDoc-Text-Structured/t/021_smilies.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lt/021_smilies.t -Lt/021_smilies.t -u -r1.1 -r1.2
--- t/021_smilies.t
+++ t/021_smilies.t
@@ -7,13 +7,13 @@
 my $text = undef;
 
 $text = MKDoc::Text::Structured::process ('This :-)is a;-) test :-(');
-is ($text, '<p>This <span class="smilie-happy">:-)</span>is a;-) test <span class="smilie-sad">:-(</span></p>');
+is ($text, '<p>This <span class="smiley-happy">:-)</span>is a;-) test <span class="smiley-sad">:-(</span></p>');
 
 $text = MKDoc::Text::Structured::process ('test &-) test');
 is ($text, '<p>test &amp;-) test</p>');
 
 $text = MKDoc::Text::Structured::process ('BBC (Brit Broad Corp :-) test');
-is ($text, '<p><abbr title="Brit Broad Corp :-">BBC</abbr> (Brit Broad Corp <span class="smilie-happy">:-)</span> test</p>');
+is ($text, '<p><abbr title="Brit Broad Corp :-">BBC</abbr> (Brit Broad Corp <span class="smiley-happy">:-)</span> test</p>');
 
 $text = MKDoc::Text::Structured::process ('BBC(Brit Broad Corp :-) test');
 is ($text, '<p><abbr title="Brit Broad Corp :-">BBC</abbr> test</p>');


More information about the MKDoc-commit mailing list