bbcode-rails 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bbcode-rails.rb +1 -3
- data/lib/bbcode-rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9bac592d179796699f229ed498ae9b9c27c3f64
|
4
|
+
data.tar.gz: 01341cfcf0aa3e2a4b56c729f4621afaf2934e0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7f7193987e68e9f2b5f35958020d2ad2147f36f378b9fe5103156b5e1ab2ca6a83602092e22d0512ac4f701e687975345918c9b72c0c87dd87ff7237112cad1
|
7
|
+
data.tar.gz: b7556c0bad30526d570ce43d53511050897a5e57be9be614ce7cffd6bef29f5bc1ba725db630d718d49ef6a91985b651553d31b07e057a487beb853859a88990
|
data/lib/bbcode-rails.rb
CHANGED
@@ -160,9 +160,7 @@ module BBCode
|
|
160
160
|
start_tag = '<p>'
|
161
161
|
result_str.gsub!(/\r\n?/, "\n") # \r\n and \r => \n
|
162
162
|
result_str.gsub!(/\n\n+/, "</p>\n\n#{start_tag}") # 2+ newline => paragraph
|
163
|
-
result_str.gsub!(/([^\n>]\n)(?=[^\n<])/, '\1<br>')# 1 newline => br
|
164
|
-
result_str.gsub!(/(>)\n+/, '\1') # 1 newline around tags => nothing
|
165
|
-
result_str.gsub!(/\n+(<)/, '\1') # 1 newline around tags => nothing
|
163
|
+
#result_str.gsub!(/([^\n>]\n)(?=[^\n<])/, '\1<br>')# 1 newline => br
|
166
164
|
result_str.insert 0, start_tag
|
167
165
|
result_str << '</p>'
|
168
166
|
rescue BBCode::ParseError => e
|
data/lib/bbcode-rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bbcode-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcel Müller
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|