improve_typography 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/improve_typography/processors/single_quotes.rb +2 -2
- data/lib/improve_typography/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1b2c092429e7061298051978b7e283e506720e521f9e56a20f31b599194df39
|
4
|
+
data.tar.gz: 02c3b65a7e6c7c7ab0ef36fd3772e83aa23fd6dbea1755db361466ea858b4dc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43da94383330d521447b7d7be4560c3f539a2718d8e853ee05edeb3a26a2b08e78239f67030b85aee101a8bdaf000edf7bfe4f10a4b8e3014b6afb94e5dfc58d
|
7
|
+
data.tar.gz: d9521e056f4867743541d1a40b3614aba9149ba59c7707ed5fd80a5b0a53a2aaf2765ce92545a8b570d97ae0fedcfafd3c80328c67112807bc588bba50b9b593
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,7 @@ module ImproveTypography
|
|
3
3
|
class SingleQuotes < Processor
|
4
4
|
def call
|
5
5
|
return str unless sign_exists?(single_quotes)
|
6
|
-
return str unless str.match?(
|
6
|
+
return str unless str.match?(regexp)
|
7
7
|
replace_single_quotes
|
8
8
|
end
|
9
9
|
|
@@ -14,7 +14,7 @@ module ImproveTypography
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def regexp
|
17
|
-
@regexp ||= Regexp.new("['#{single_quotes[0]}#{single_quotes[1]}](.*?)['#{single_quotes[0]}#{single_quotes[1]}](?!\\w)")
|
17
|
+
@regexp ||= Regexp.new("(?<=\\A|\\W)['#{single_quotes[0]}#{single_quotes[1]}](.*?)['#{single_quotes[0]}#{single_quotes[1]}](?!\\w)")
|
18
18
|
end
|
19
19
|
|
20
20
|
def single_quotes
|