bluefeather 0.32 → 0.33
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile.rb +1 -0
- data/doc/en/index.bfdoc +1 -1
- data/doc/en/index.html +1 -1
- data/doc/index.bfdoc +1 -1
- data/doc/index.html +1 -1
- data/lib/bluefeather.rb +9 -4
- data/spec/code-block.rb +2 -0
- data/spec/table.rb +24 -4
- metadata +2 -2
data/Rakefile.rb
CHANGED
data/doc/en/index.bfdoc
CHANGED
@@ -10,7 +10,7 @@ BlueFeather Manual
|
|
10
10
|
|
11
11
|
-> [Japanese version (original)](../index.html)
|
12
12
|
|
13
|
-
(2009-
|
13
|
+
(2009-11-22: this document based on version 0.33)
|
14
14
|
|
15
15
|
BlueFeather is software for converting text written by extended Markdown like
|
16
16
|
[PHP Markdown Extra][] to html. It is pair of command-line tool and pure Ruby
|
data/doc/en/index.html
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
<p>-> <a href="../index.html">Japanese version (original)</a></p>
|
14
14
|
|
15
|
-
<p>(2009-
|
15
|
+
<p>(2009-11-22: this document based on version 0.33)</p>
|
16
16
|
|
17
17
|
<p>BlueFeather is software for converting text written by extended Markdown like
|
18
18
|
<a href="http://michelf.com/projects/php-markdown/extra/">PHP Markdown Extra</a> to html. It is pair of command-line tool and pure Ruby
|
data/doc/index.bfdoc
CHANGED
data/doc/index.html
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
|
14
14
|
<p>→ <a href="en/index.html">English version</a></p>
|
15
15
|
|
16
|
-
<p>(2009-
|
16
|
+
<p>(2009-11-22 バージョン 0.33 準拠)</p>
|
17
17
|
|
18
18
|
<p>BlueFeather は、拡張 Markdown 記法で書かれたテキストを html に変換するソフトウェアです。
|
19
19
|
コマンドラインツールと、Ruby スクリプト内で変換を行うためのライブラリがセットになっています。</p>
|
data/lib/bluefeather.rb
CHANGED
@@ -42,9 +42,9 @@ require 'uri'
|
|
42
42
|
|
43
43
|
|
44
44
|
module BlueFeather
|
45
|
-
VERSION = '0.
|
46
|
-
VERSION_NUMBER = 0.
|
47
|
-
RELEASE_DATE = '2009-
|
45
|
+
VERSION = '0.33'
|
46
|
+
VERSION_NUMBER = 0.33
|
47
|
+
RELEASE_DATE = '2009-11-22'
|
48
48
|
VERSION_LABEL = "#{VERSION} (#{RELEASE_DATE})"
|
49
49
|
|
50
50
|
UTF8_BOM = "\xef\xbb\xbf"
|
@@ -1062,11 +1062,16 @@ module BlueFeather
|
|
1062
1062
|
}x
|
1063
1063
|
|
1064
1064
|
def transform_table_rows(str, rs)
|
1065
|
+
|
1065
1066
|
# split cells to 2-d array
|
1066
1067
|
data = str.split("\n").map{|x| x.split('|')}
|
1067
1068
|
|
1068
|
-
|
1069
|
+
|
1069
1070
|
data.each do |row|
|
1071
|
+
# cut left space
|
1072
|
+
row.first.lstrip!
|
1073
|
+
|
1074
|
+
# cut when optional side-borders is included
|
1070
1075
|
row.shift if row.first.empty?
|
1071
1076
|
end
|
1072
1077
|
|
data/spec/code-block.rb
CHANGED
@@ -219,11 +219,13 @@ MARKDOWN
|
|
219
219
|
end
|
220
220
|
|
221
221
|
specify 'overview' do
|
222
|
+
pending 'not fixed'
|
222
223
|
@doc.should have_elements(1, 'ul li pre code')
|
223
224
|
@doc.should_not have_element('pre code pre')
|
224
225
|
end
|
225
226
|
|
226
227
|
specify 'body' do
|
228
|
+
pending 'not fixed'
|
227
229
|
@doc.at('pre code').inner_text.should == "* example list in code block\n\n ~~~\n code\n ~~~\n"
|
228
230
|
end
|
229
231
|
end
|
data/spec/table.rb
CHANGED
@@ -11,10 +11,6 @@ describe 'Simple Table:' do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
share_as :StandardTable do
|
14
|
-
specify "regexp matching" do
|
15
|
-
@src.should =~ BlueFeather::Parser::TableRegexp
|
16
|
-
end
|
17
|
-
|
18
14
|
specify "table overview" do
|
19
15
|
@doc.should have_elements(1, 'table')
|
20
16
|
end
|
@@ -64,7 +60,31 @@ describe 'Simple Table:' do
|
|
64
60
|
end
|
65
61
|
end
|
66
62
|
|
63
|
+
describe 'left space:' do
|
64
|
+
include StandardTable
|
65
|
+
|
66
|
+
before(:all) do
|
67
|
+
@src = " | h1 | h2 | h3 \n | - | -: | :-: \n | d11 | d21 | d31\n | d12 | d22 | d32"
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
67
71
|
|
72
|
+
describe 'in definition list:' do
|
73
|
+
include StandardTable
|
74
|
+
|
75
|
+
before(:all) do
|
76
|
+
@src = <<MARKDOWN
|
77
|
+
Apple
|
78
|
+
|
79
|
+
: Apple content
|
80
|
+
|
81
|
+
| h1 | h2 | h3
|
82
|
+
| - | -: | :-:
|
83
|
+
| d11 | d21 | d31
|
84
|
+
| d12 | d22 | d32
|
85
|
+
MARKDOWN
|
86
|
+
end
|
87
|
+
end
|
68
88
|
|
69
89
|
|
70
90
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bluefeather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: "0.
|
4
|
+
version: "0.33"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dice
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-11-22 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|