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

fix #119 #122

Merged
merged 1 commit into from
Jul 3, 2016
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
3 changes: 1 addition & 2 deletions lib/Text/Md2Inao.pm
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ sub use_special_italic {
sub prepare_text_for_markdown {
my $text = shift;

## Work Around: 先頭空白は字下げとみなし全角空白に置き換える (issue #4)
$text =~ s/^[ ]{1,3}([^ <])/ $1/mg;
## 先頭空白は字下げとみなして全角空白に置き換えていた仕様は撤回 (issue #4, #119)

## Work Around: リストの後にコードブロックが続くとだめな問題 (issue #6)
$text =~ s!([-*+] .*?)\n\n !$1\n\n \n\n !g;
Expand Down
47 changes: 42 additions & 5 deletions t/99_rt_indent.t
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ World
--- in md2inao
Hello, World
--- expected
 Hello, World
Hello, World

=== case 5
--- in md2inao
Hello, World
--- expected
 Hello, World
Hello, World

=== case 6
--- in md2inao
Hello, World
--- expected
 Hello, World
Hello, World

=== case 7
--- in md2inao
Expand Down Expand Up @@ -83,18 +83,55 @@ print "Hello, world";

blah blah
--- expected
 blah blah
blah blah
◆list/◆
use strict;
use warnings;

print "Hello, world";
◆/list◆
 blah blah
blah blah

=== case 10
--- in md2inao
 blah blah
--- expected
 blah blah

=== case 11
--- in md2id
```
0
1
2
3
4
```
--- expected
<SJIS-MAC>
<ParaStyle:半行アキ>
<ParaStyle:リスト>0
<ParaStyle:リスト> 1
<ParaStyle:リスト> 2
<ParaStyle:リスト> 3
<ParaStyle:リスト> 4

=== case 12
--- in md2id
0

1

2

3

4
--- expected
<SJIS-MAC>
<ParaStyle:本文>0
<ParaStyle:本文>1
<ParaStyle:本文>2
<ParaStyle:本文>3
<ParaStyle:半行アキ>
<ParaStyle:リスト>4
16 changes: 8 additions & 8 deletions t/99_rt_list.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ __END__
* Baz

Piyo
--- expected
--- expected -trim
・Foo
・Bar
・Baz
 Piyo
Piyo

=== case 2
--- in md2inao
Expand All @@ -38,10 +38,10 @@ Piyo
* あ

--- expected
--- expected -trim
・あ
・あ
 

=== case 4
--- in md2inao
Expand Down Expand Up @@ -96,12 +96,12 @@ Piyo
bar

baz
--- expected
 blah blah
--- expected -trim
blah blah
・Hoge
・Foo
 bar
 baz
bar
baz

=== case 8
--- in md2inao
Expand Down