add_to_calendar_links 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 112379eec66ebac74d14e971f58a12f2ff5ca3cf04ea22db4caef02e3dc9debd
4
- data.tar.gz: 67ef72a9bb9d7a470b6f666f13c5c24e72d8107f6d557141038efba262ce3578
3
+ metadata.gz: 3d92f7b9879a385554bafb57afd02b577d7a3ba10b81484534665b4137400cf3
4
+ data.tar.gz: ae2db556c46a88256cf808aa56cef2d059f253aa3442183a42b38c10c946720c
5
5
  SHA512:
6
- metadata.gz: 36b1aaa14e637d2c4cad2f36bef918381514101692555851be069e07ed67b1b8ea973b823cf7a1a42cdd9eb6a75dec9ab70a6376f7aa7740d8d6b69b5b0acd43
7
- data.tar.gz: 8ac0a89fbcefba62d3b6bb8591797df952ba6621b28511e6033fa92e2b634bab5841fe19f91ec4b1eff7ce67993559d3bd2da806796c75535bf3525c8af418d6
6
+ metadata.gz: aaa19f86a27033729e856b955adee991d612d3dcde7f6830b8a8235db80608c9e57676f5876c6c0d6a60dc1c3abb767879a1eb24796d1ac54743966ad313f6b4
7
+ data.tar.gz: 1f4a135357d2b5a34dd1094031dd524723fd1a247b359b6f4c1606ef780bef5f97ae382802e26701816d0ad733afecebc0e5387754755d585f1aea0fb6b72490
@@ -7,7 +7,7 @@ include ERB::Util
7
7
  require 'tzinfo'
8
8
  require 'date'
9
9
  require 'uri'
10
- # require 'pry'
10
+ require 'byebug'
11
11
 
12
12
  module AddToCalendarLinks
13
13
  class Error < StandardError; end
@@ -258,12 +258,12 @@ module AddToCalendarLinks
258
258
  if strip_html
259
259
  string.gsub!("<br>", "\n")
260
260
  string.gsub!("<p>", "\n")
261
- string.gsub!("</p>", "\n")
261
+ string.gsub!("</p>", "\n\n")
262
+ string.gsub!("&amp;", "and")
263
+ string.gsub!("&nbsp;", " ")
262
264
  string = strip_html_tags(string)
263
265
  end
264
266
  string.gsub!("\\", "\\\\\\") # \ >> \\ --yes, really: https://stackoverflow.com/questions/6209480/how-to-replace-backslash-with-double-backslash
265
- string.gsub!(",", "\\,")
266
- string.gsub!(";", "\\;")
267
267
  string.gsub!("\r\n", "\n") # so can handle all newlines the same
268
268
  string.split("\n").map { |e|
269
269
  if e.empty?
@@ -271,7 +271,7 @@ module AddToCalendarLinks
271
271
  else
272
272
  url_encode(e)
273
273
  end
274
- }.join("\\n")
274
+ }.join("\n")
275
275
  end
276
276
 
277
277
  def strip_html_tags(description)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AddToCalendarLinks
4
- VERSION = '0.3.3'
4
+ VERSION = '0.3.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: add_to_calendar_links
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared Turner