Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

リストが連続すると、*が-になることがある #80

Merged
merged 3 commits into from
Mar 9, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Text/Md2Inao.pm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ sub prepare_text_for_markdown {
$text =~ s/^[ ]{1,3}([^ <])/ $1/mg;

## Work Around: リストの後にコードブロックが続くとだめな問題 (issue #6)
$text =~ s![-*+] (.*?)\n\n !- $1\n\n \n\n !g;
$text =~ s!([-*+] .*?)\n\n !$1\n\n \n\n !g;

return $text;
}
Expand Down
24 changes: 24 additions & 0 deletions t/30_indesign_basic_syntax.t
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,30 @@ __END__
<ParaStyle:リスト白文字> alert(b); <CharStyle:リストコメント白地黒文字> コメント <CharStyle:>
<ParaStyle:リスト白文字>}

=== list
--- in md2inao
* ハイフンになる

a


* ハイフンにならない
* ハイフンになる

a
--- expected
<ParaStyle:半行アキ>
<ParaStyle:リスト>* ハイフンになる
<ParaStyle:半行アキ>
<ParaStyle:リスト>a
<ParaStyle:本文>あ
<ParaStyle:半行アキ>
<ParaStyle:リスト>* ハイフンにならない
<ParaStyle:リスト>* ハイフンになる
<ParaStyle:半行アキ>
<ParaStyle:リスト>a

=== anchor
--- in md2inao
[RubyMotion](http://rubymotion.com)
Expand Down