Permalink
Browse files

[Text::Markdown] s/italics/italic/

Turns out SVG doesn't have an 's' there.
  • Loading branch information...
1 parent 6c16760 commit da71ac663bcc43ed740a30815c4f25a5ec5e5375 @masak committed Apr 21, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 lib/Text/Markdown.pm
  2. +3 −3 t/text.t
View
2 lib/Text/Markdown.pm
@@ -124,7 +124,7 @@ sub extract_tspans($text) {
my @tags = $0».Str;
my $contents = $1;
my %attrs;
- if any(@tags) eq 'em' { %attrs<font-style> = 'italics' }
+ if any(@tags) eq 'em' { %attrs<font-style> = 'italic' }
if any(@tags) eq 'strong' { %attrs<font-weight> = 'bold' }
if any(@tags) eq 'code' { %attrs<font-family> = 'monospace' }
take TSpan.new(:text($contents), |%attrs);
View
6 t/text.t
@@ -24,7 +24,7 @@ use Text::Markdown;
is $para.children[1].text, "italics", 'correct 2/3 tspan';
is $para.children[2].text, " in it.", 'correct 3/3 tspan';
is $para.children[0].font-style, "", 'correct 1/3 font-style';
- is $para.children[1].font-style, "italics", 'correct 2/3 font-style';
+ is $para.children[1].font-style, "italic", 'correct 2/3 font-style';
is $para.children[2].font-style, "", 'correct 3/3 font-style';
}
@@ -63,11 +63,11 @@ use Text::Markdown;
is $para.children[5].text, "and", 'correct 6/7 tspan';
is $para.children[6].text, " combine them.", 'correct 7/7 tspan';
is $para.children[0].font-style, "", 'correct 1/7 font-style';
- is $para.children[1].font-style, "italics", 'correct 2/7 font-style';
+ is $para.children[1].font-style, "italic", 'correct 2/7 font-style';
is $para.children[2].font-style, "", 'correct 3/7 font-style';
is $para.children[3].font-style, "", 'correct 4/7 font-style';
is $para.children[4].font-style, "", 'correct 5/7 font-style';
- is $para.children[5].font-style, "italics", 'correct 6/7 font-style';
+ is $para.children[5].font-style, "italic", 'correct 6/7 font-style';
is $para.children[6].font-style, "", 'correct 7/7 font-style';
is $para.children[0].font-weight, "", 'correct 1/7 font-weight';
is $para.children[1].font-weight, "", 'correct 2/7 font-weight';

0 comments on commit da71ac6

Please sign in to comment.