trainbbcode 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('trainbbcode','0.2.6') do |p|
5
+ Echoe.new('trainbbcode','0.2.7') do |p|
6
6
  p.description = "Provides BBCode for Ruby."
7
7
  p.url = "http://www.arcath.net/pages/2"
8
8
  p.author = "Adam \"Arcath\" Laycock"
data/lib/trainbbcode.rb CHANGED
@@ -47,6 +47,7 @@ class TBBC
47
47
  s=s.gsub(tag[0],tag[1]) unless tag[2] == false
48
48
  end
49
49
  end
50
+ s=correctbrs s
50
51
  return s
51
52
  end
52
53
  def load_default_tags
@@ -116,6 +117,10 @@ class TBBC
116
117
  s=s.gsub(/\[code lang=(.*?)\]/,'').gsub("[/code]",'')
117
118
  return s
118
119
  end
120
+ def correctbrs(s)
121
+ #Corrects the extra brs
122
+ s=s.gsub(/<br \/><(ul|li|table|tr|td|th)/,'<\1')
123
+ end
119
124
  end
120
125
 
121
126
  #Add .tbbc to Strings
data/trainbbcode.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{trainbbcode}
5
- s.version = "0.2.6"
5
+ s.version = "0.2.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Adam \"Arcath\" Laycock"]
9
- s.date = %q{2009-12-30}
9
+ s.date = %q{2010-01-20}
10
10
  s.description = %q{Provides BBCode for Ruby.}
11
11
  s.email = %q{adam@arcath.net}
12
12
  s.extra_rdoc_files = ["README.rdoc", "lib/trainbbcode.rb"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trainbbcode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam "Arcath" Laycock
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-30 00:00:00 +00:00
12
+ date: 2010-01-20 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies: []
15
15