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 +4 -4
- data/Gemfile.lock +3 -3
- data/lib/sterile/smart_format.rb +1 -0
- data/lib/sterile/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54f6ac8ea9a3e5802c5b86f5befee2a68e3aec5929e63d688fd6ad2279e056ac
|
4
|
+
data.tar.gz: 7924d238a5d5211a343bda5a9fb280e0686009dc2ca97fe98ebe3b4844776ecd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e8ccd1ae5c05c787ecaf255dafba763593e6d2405c2b4204a3984ae08a007700349c2f47d6c8334d8886f40c40183c59535cadf9f91bae947fc92875e2c4399
|
7
|
+
data.tar.gz: d6533af4c6e9e03808ce7a634642040d7df9c024a9b7a1a3e5cc91058ad47d522466ba4f8e2e6d1666ed3cb3dad19d1dfc9db8a4d826c3e06eadab1003fa9a7f
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sterile (1.0.
|
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.
|
11
|
+
nokogiri (1.10.10)
|
12
12
|
mini_portile2 (~> 2.4.0)
|
13
13
|
|
14
14
|
PLATFORMS
|
data/lib/sterile/smart_format.rb
CHANGED
@@ -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+\>)“/, "\\1”").gsub(/(\<\/\w+\>)‘/, "\\1’")
|
data/lib/sterile/version.rb
CHANGED
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.
|
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-
|
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.
|