fnando-kitabu 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/kitabu.gemspec +1 -1
- data/lib/kitabu/base.rb +1 -1
- data/lib/kitabu/blackcloth.rb +1 -7
- metadata +1 -1
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ PKG_FILES = %w(Rakefile kitabu.gemspec README.markdown) + Dir["{bin,lib,template
|
|
4
4
|
|
5
5
|
spec = Gem::Specification.new do |s|
|
6
6
|
s.name = "kitabu"
|
7
|
-
s.version = "0.3.
|
7
|
+
s.version = "0.3.3"
|
8
8
|
s.summary = "A framework for creating e-books from Markdown/Textile text markup using Ruby."
|
9
9
|
s.authors = ["Nando Vieira"]
|
10
10
|
s.email = ["fnando.vieira@gmail.com"]
|
data/kitabu.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.add_dependency "unicode", ">= 0"
|
18
18
|
s.add_dependency "main", ">= 0"
|
19
19
|
s.add_dependency "ultraviolet", ">= 0"
|
20
|
-
s.version = "0.3.
|
20
|
+
s.version = "0.3.3"
|
21
21
|
s.require_paths = ["lib"]
|
22
22
|
s.files = ["Rakefile",
|
23
23
|
"kitabu.gemspec",
|
data/lib/kitabu/base.rb
CHANGED
data/lib/kitabu/blackcloth.rb
CHANGED
@@ -105,13 +105,7 @@ class BlackCloth < RedCloth
|
|
105
105
|
# Usage: figure(This is the caption). some_image.jpg
|
106
106
|
def textile_figure(tag, attrs, cite, content)
|
107
107
|
m, title = *attrs.match(/class="(.*?)"/)
|
108
|
-
|
109
|
-
%(<p class="figure"><img style="width: #{width}px; height: #{height}px" src="../images/#{content}" alt="#{title}" /><br/><span class="caption">#{title}</span></p>)
|
110
|
-
end
|
111
|
-
|
112
|
-
def image_size(img)
|
113
|
-
io = IO.popen("php -r '$info = getimagesize(\"images/#{img}\");echo $info[0].'x'.$info[1];'")
|
114
|
-
io.read.split('x').map{|n| n.to_i}
|
108
|
+
%(<p class="figure"><img src="../images/#{content}" alt="#{title}" /><br/><span class="caption">#{title}</span></p>)
|
115
109
|
end
|
116
110
|
|
117
111
|
# overriding inline method
|