sterile 1.0.16 → 1.0.17

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: 9e58e882fc9f9b84e9881a701a0dea664d97ad0138bfe60928556e982b0b5967
4
- data.tar.gz: a8c943040bfa2c9f34a07587c12914fc4e22edc3bf85917b84288fae33d7a6ec
3
+ metadata.gz: 54f6ac8ea9a3e5802c5b86f5befee2a68e3aec5929e63d688fd6ad2279e056ac
4
+ data.tar.gz: 7924d238a5d5211a343bda5a9fb280e0686009dc2ca97fe98ebe3b4844776ecd
5
5
  SHA512:
6
- metadata.gz: 4da8f6e396f474b639450f36416d950775d51feff7dc3dc642b447a5e0ef00788121654a175488a87270fbc22059013dd9013e13ced6730e9ffee6850db84fb3
7
- data.tar.gz: 92c41a6da178516a2fdaf5c719e6dc13f27e372e3a3452d6ada73d884c73a10ec9bb0e5439b57fa59e83f498a61d44374aa94ae3133d07037a255df1c34c77d0
6
+ metadata.gz: 2e8ccd1ae5c05c787ecaf255dafba763593e6d2405c2b4204a3984ae08a007700349c2f47d6c8334d8886f40c40183c59535cadf9f91bae947fc92875e2c4399
7
+ data.tar.gz: d6533af4c6e9e03808ce7a634642040d7df9c024a9b7a1a3e5cc91058ad47d522466ba4f8e2e6d1666ed3cb3dad19d1dfc9db8a4d826c3e06eadab1003fa9a7f
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sterile (1.0.14)
5
- nokogiri
4
+ sterile (1.0.17)
5
+ nokogiri (>= 1.10.8)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
10
  mini_portile2 (2.4.0)
11
- nokogiri (1.9.1)
11
+ nokogiri (1.10.10)
12
12
  mini_portile2 (~> 2.4.0)
13
13
 
14
14
  PLATFORMS
@@ -19,6 +19,7 @@ module Sterile
19
19
  # Like +smart_format+, but works with HTML/XML (somewhat).
20
20
  #
21
21
  def smart_format_tags(string)
22
+ string = string.gsub /[\p{Z}\s]+(<\/[a-zA-Z]+>)(['"][a-zA-Z])/, "\\1 \\2" # Fixes quote after whitespace + tag "<em>Dan. </em>'And"
22
23
  string.gsub_tags do |text|
23
24
  text.smart_format
24
25
  end.encode_entities.gsub(/(\<\/\w+\>)&ldquo;/, "\\1&rdquo;").gsub(/(\<\/\w+\>)&lsquo;/, "\\1&rsquo;")
@@ -1,6 +1,6 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module Sterile
4
- VERSION = "1.0.16"
4
+ VERSION = "1.0.17"
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sterile
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.16
4
+ version: 1.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Hogan
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-13 00:00:00.000000000 Z
11
+ date: 2020-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -59,7 +59,7 @@ files:
59
59
  homepage: https://github.com/pbhogan/sterile
60
60
  licenses: []
61
61
  metadata: {}
62
- post_install_message:
62
+ post_install_message:
63
63
  rdoc_options: []
64
64
  require_paths:
65
65
  - lib
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubygems_version: 3.0.8
78
- signing_key:
78
+ signing_key:
79
79
  specification_version: 4
80
80
  summary: Sterilize your strings! Transliterate, generate slugs, smart format, strip
81
81
  tags, encode/decode entities and more.