forspell 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/forspell/sanitizer.rb +7 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4dd2b546e45d6a2fab1fb824f628cc2f17d802ce
|
4
|
+
data.tar.gz: e575a2f71a0968b33e715a153d535400dec007e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8f3d245078e74f33da758e09f724d2c911655ee7e4d792e599bd11d7a073fa8ae2acf8972868552939b91a6567d703d3c8972a11adce97bd573fb3c2496a641
|
7
|
+
data.tar.gz: 62826962163488488a5ce89fb72a608fd02a858fbec5e428ec96f8be4980208bc1349eca19d0800967241208b2b2cf833da6536591551f196c62f2df0d6b2885
|
data/lib/forspell/sanitizer.rb
CHANGED
@@ -9,9 +9,14 @@ module Forspell
|
|
9
9
|
|
10
10
|
def self.sanitize(input)
|
11
11
|
|
12
|
-
CGI.unescapeHTML(Sanitize.fragment(input,
|
12
|
+
result = CGI.unescapeHTML(Sanitize.fragment(input,
|
13
13
|
elements: [], remove_contents: true))
|
14
|
-
|
14
|
+
.gsub(REMOVE_PUNCT, '').gsub(/[\!\.\?]{1}$/, '')
|
15
|
+
if result.start_with?("'") && result.end_with?("'")
|
16
|
+
result[1..-2]
|
17
|
+
else
|
18
|
+
result
|
19
|
+
end
|
15
20
|
end
|
16
21
|
end
|
17
22
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forspell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kirill Kuprikov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-05-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: slop
|
@@ -230,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
230
230
|
version: '0'
|
231
231
|
requirements: []
|
232
232
|
rubyforge_project:
|
233
|
-
rubygems_version:
|
233
|
+
rubygems_version: 2.6.14
|
234
234
|
signing_key:
|
235
235
|
specification_version: 4
|
236
236
|
summary: For spelling check
|