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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6d3cfe8e809e1e21fcc9eb90c85e6eab6704d96160dab03e3708a88981ac0e9
4
- data.tar.gz: 2e94d39063ec4ecadbdb034015adca8f70c3c6aae9167756696a38305b80a620
3
+ metadata.gz: a1b2c092429e7061298051978b7e283e506720e521f9e56a20f31b599194df39
4
+ data.tar.gz: 02c3b65a7e6c7c7ab0ef36fd3772e83aa23fd6dbea1755db361466ea858b4dc1
5
5
  SHA512:
6
- metadata.gz: f4104301d85835ceabe273e522c690dfdd24d19ee644fc98d2864fa2261c241ac0a705e622c7d741fedff1aa633270d4e8fd05b4dafc18a46272c6091939f771
7
- data.tar.gz: 559c315c4eef1bd0ea29634d84aa02c9d9560119c5cd5cf135ba6147fd5cdced0038dbf71cf724aab645005f7df6f48a1765d14161255be0f83a00b5ec3255c4
6
+ metadata.gz: 43da94383330d521447b7d7be4560c3f539a2718d8e853ee05edeb3a26a2b08e78239f67030b85aee101a8bdaf000edf7bfe4f10a4b8e3014b6afb94e5dfc58d
7
+ data.tar.gz: d9521e056f4867743541d1a40b3614aba9149ba59c7707ed5fd80a5b0a53a2aaf2765ce92545a8b570d97ae0fedcfafd3c80328c67112807bc588bba50b9b593
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.1.17
4
+
5
+ * fix single quote capturing apostrophes (@asgerb)
6
+
3
7
  ## 0.1.16
4
8
 
5
9
  * guard for missing `i18n` translations (@asgerb)
@@ -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?(/[\'#{single_quotes[0]}#{single_quotes[1]}]/)
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
@@ -1,3 +1,3 @@
1
1
  module ImproveTypography
2
- VERSION = '0.1.16'.freeze
2
+ VERSION = '0.1.17'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: improve_typography
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Celizna