pettanr_simple_format 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,8 +9,9 @@ class PettanrSimpleFormat
9
9
  text = PettanrSimpleFormat.escapeHTML(content)
10
10
  start_tag = '<p>'
11
11
  text = text.replace(/\r\n?/g, "\n")
12
- text = text.replace(/\n\n+/g, "</p>\n\n<p>")
13
- text = text.replace(/([^\n]\n)(?=[^\n])/g, '\n<br />')
12
+ text = text.replace(/\n\n+/g, "</p><p>")
13
+ text = text.replace(/\n/g, '\n<br />')
14
+ text = text.replace(/\<\/p\>\<p\>/g, "</p>\n\n<p>")
14
15
  text = start_tag + text + "</p>"
15
16
  return text
16
17
 
@@ -1,3 +1,3 @@
1
1
  module PettanrSimpleFormat
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pettanr_simple_format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: