Skip to content

Commit

Permalink
上付きを脚注上付きにリネームする
Browse files Browse the repository at this point in the history
  • Loading branch information
inao committed Feb 26, 2020
1 parent b3891ae commit 1b8162c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config/id_filter.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"before_filter": {
"<sup>" : "<CharStyle:上付き>",
"<sup>" : "<CharStyle:脚注上付き>",
"</sup>" : "<CharStyle:>",
"<sup2>" : "<cp:Superscript>",
"</sup2>" : "<cp:>"
Expand Down
4 changes: 2 additions & 2 deletions lib/Text/Md2Inao/Builder/InDesign.pm
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ case text => sub {

if ($text =~ m!\(注:! or $c->in_footnote) {
$text = replace_note_parenthesis($c, $text, '');
$text =~ s!◆注/◆!<cstyle:上付き><fnStart:><pstyle:脚注>!g;
$text =~ s!◆注/◆!<cstyle:脚注上付き><fnStart:><pstyle:脚注>!g;
$text =~ s!◆/注◆!<fnEnd:><cstyle:>!g;
}

Expand Down Expand Up @@ -428,7 +428,7 @@ case a => sub {
my $url = $h->attr('href');
my $title = $c->parse_element($h);
if ($url and $title) {
return sprintf "%s<cstyle:上付き><fnStart:><pstyle:脚注>%s<fnEnd:><cstyle:>", $title, $url;
return sprintf "%s<cstyle:脚注上付き><fnStart:><pstyle:脚注>%s<fnEnd:><cstyle:>", $title, $url;
} else {
return fallback_to_escaped_html($h);
}
Expand Down
4 changes: 2 additions & 2 deletions t/30_indesign_basic_syntax.t
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ _a-zA-Z0-9!"#$%&'()-=^@`[]{};+:*<>,./?_
--- in md2inao
これは(注:ここは脚注です)です
--- expected
<ParaStyle:本文>これは<cstyle:上付き><fnStart:><pstyle:脚注>ここは脚注です<fnEnd:><cstyle:>です
<ParaStyle:本文>これは<cstyle:脚注上付き><fnStart:><pstyle:脚注>ここは脚注です<fnEnd:><cstyle:>です
=== red
--- in md2inao
Expand Down Expand Up @@ -479,7 +479,7 @@ function bar(b) {
--- in md2inao
[RubyMotion](http://rubymotion.com)
--- expected
<ParaStyle:本文>RubyMotion<cstyle:上付き><fnStart:><pstyle:脚注>http://rubymotion.com<fnEnd:><cstyle:>
<ParaStyle:本文>RubyMotion<cstyle:脚注上付き><fnStart:><pstyle:脚注>http://rubymotion.com<fnEnd:><cstyle:>
=== img
--- in md2inao
Expand Down
2 changes: 1 addition & 1 deletion t/32_indesign_free_replacer.t
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ __END__
--- in md2inao
<sup>上付き(ゴシック、コラムなどでの注記用)</sup>
--- expected
<ParaStyle:本文><CharStyle:上付き>上付き(ゴシック、コラムなどでの注記用)<CharStyle:>
<ParaStyle:本文><CharStyle:脚注上付き>上付き(ゴシック、コラムなどでの注記用)<CharStyle:>
=== sup
--- in md2inao
Expand Down
4 changes: 2 additions & 2 deletions t/99_rt_ruby_in_footnote.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ __END__
○○います(注:あいう<span class='monoruby'>辟易(へき えき)</span>えお)。
--- expected
<SJIS-MAC>
<ParaStyle:本文>○○います<cstyle:上付き><fnStart:><pstyle:脚注>あいう<cr:1><crstr:へき えき><cmojir:1>辟易<cr:><crstr:><cmojir:>えお<fnEnd:><cstyle:>。
<ParaStyle:本文>○○います<cstyle:脚注上付き><fnStart:><pstyle:脚注>あいう<cr:1><crstr:へき えき><cmojir:1>辟易<cr:><crstr:><cmojir:>えお<fnEnd:><cstyle:>。

=== groupruby
--- in md2id
○○います(注:あいう<span class='groupruby'>欠伸(あくび)</span>えお)。
--- expected
<SJIS-MAC>
<ParaStyle:本文>○○います<cstyle:上付き><fnStart:><pstyle:脚注>あいう<cr:1><crstr:あくび><cmojir:0>欠伸<cr:><crstr:><cmojir:>えお<fnEnd:><cstyle:>。
<ParaStyle:本文>○○います<cstyle:脚注上付き><fnStart:><pstyle:脚注>あいう<cr:1><crstr:あくび><cmojir:0>欠伸<cr:><crstr:><cmojir:>えお<fnEnd:><cstyle:>。

0 comments on commit 1b8162c

Please sign in to comment.