texta 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/lib/texta.rb +8 -1
- data/texta.gemspec +2 -2
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/texta.rb
CHANGED
@@ -52,6 +52,9 @@ module Texta
|
|
52
52
|
|
53
53
|
def process(node)
|
54
54
|
case node.name
|
55
|
+
when "meta", "link"
|
56
|
+
""
|
57
|
+
|
55
58
|
# bold
|
56
59
|
when "b", "strong"
|
57
60
|
"**" + children(node).join(" ") + "**"
|
@@ -82,7 +85,11 @@ module Texta
|
|
82
85
|
# images
|
83
86
|
|
84
87
|
when "img"
|
85
|
-
|
88
|
+
alt = node["alt"]
|
89
|
+
alt = nil if alt == ""
|
90
|
+
alt = node["title"] if !alt
|
91
|
+
|
92
|
+
if alt && alt != ""
|
86
93
|
"[#{alt}]"
|
87
94
|
end
|
88
95
|
|
data/texta.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{texta}
|
5
|
-
s.version = "0.
|
5
|
+
s.version = "0.2.0"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["pboy"]
|
9
|
-
s.date = %q{2010-01-
|
9
|
+
s.date = %q{2010-01-20}
|
10
10
|
s.description = %q{texta: heuristic text formatting}
|
11
11
|
s.email = %q{eno-pboy@open-lab.org}
|
12
12
|
s.extra_rdoc_files = ["README.rdoc", "lib/texta.rb"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: texta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pboy
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-01-
|
12
|
+
date: 2010-01-20 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|