texta 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +1 -1
  2. data/lib/texta.rb +8 -1
  3. data/texta.gemspec +2 -2
  4. metadata +2 -2
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('texta', '0.1.9') do |p|
5
+ Echoe.new('texta', '0.2.0') do |p|
6
6
  p.description = "texta: heuristic text formatting"
7
7
  p.url = "http://github.com/pboy/texta"
8
8
  p.author = "pboy"
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
- if alt = node["alt"] || node["title"]
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.1.9"
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-19}
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.1.9
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-19 00:00:00 +01:00
12
+ date: 2010-01-20 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency