Skip to content

Commit

Permalink
InDesign Builderで #62 に対応する
Browse files Browse the repository at this point in the history
  • Loading branch information
gfx committed May 18, 2014
1 parent 529643a commit 81fbada
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/Text/Md2Inao/Builder/InDesign.pm
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,13 @@ case strong => sub {

case em => sub {
my ($c, $h) = @_;
my $ret;
$ret .= $c->use_special_italic ? '<CharStyle:イタリック(変形斜体)>' : '<CharStyle:イタリック(変形斜体)>';
$ret .= $c->parse_element($h);
$ret .= '<CharStyle:>';
return $ret;
my $s = $c->parse_element($h);
$s =~ s{( [^[:ascii:]]+ ) | ( [[:ascii:]]+ )}{
length($1)
? "<CharStyle:イタリック(変形斜体)>$1<CharStyle:>"
: "<CharStyle:イタリック>$2<CharStyle:>";
}xmsge;
return $s;
};

case code => sub {
Expand Down

0 comments on commit 81fbada

Please sign in to comment.