language_filter 0.2 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dee09f095e1774912cf628728f5acc6735b2b85f
4
- data.tar.gz: 159c7624452c4d90cd44252edc64187e36b9a644
3
+ metadata.gz: 7e1c9631fe0b3dbfdf7b9fabedfb944e3e24f415
4
+ data.tar.gz: 9e2de907ce18dca2e42ce502e02a9e049c152abb
5
5
  SHA512:
6
- metadata.gz: d16829605c4b949b8ba758d4ba40aa23e3c164b36a5a8c3d564dce66803e995e9043619efe3036bf3d14161cb351e259ca0a9a72690d3ec9fae67f1d87d2b6f6
7
- data.tar.gz: db03b6a6a94847f9076ccc8feca139b9d17ffd1da498a21b78e31df58c9cdfa8ab1e965b70da812b18a760461ca5de23dd1afd1da3b56813979c6238f435c4d2
6
+ metadata.gz: c2f9f774e2bd8225f5777f2a9b69a8dada15b20db7dc488f878ece855cafa1a7d0dcdc78af3532fbbd929483d25887fa688821ef016a5827ef865d48ed2e60f2
7
+ data.tar.gz: af3809386cf240297283ab9ad9da7a2fd7e94de8d4e98e05e08059b396eb1235beb484a036cd82e9354da2cf1ed00b0204fe655fe77a0fef8706996b8e8f35e3
@@ -63,7 +63,7 @@ module LanguageFilter
63
63
  unless match == [nil] then
64
64
  return true if @exceptionlist.empty? or not protected_by_exceptionlist?(match_start,match_end,text,start_at)
65
65
  end
66
- start_at = match_end + 1
66
+ start_at = match_end + 1 unless @exceptionlist.empty?
67
67
  end
68
68
  end
69
69
  false
@@ -80,7 +80,7 @@ module LanguageFilter
80
80
  unless match == [nil] then
81
81
  words << match if @exceptionlist.empty? or not protected_by_exceptionlist?(match_start,match_end,text,start_at)
82
82
  end
83
- start_at = match_end + 1
83
+ start_at = match_end + 1 unless @exceptionlist.empty?
84
84
  end
85
85
  end
86
86
  words.uniq
@@ -94,10 +94,10 @@ module LanguageFilter
94
94
  match_start = text[start_at,text.size].index(/\b#{list_item}\b/i) unless @exceptionlist.empty?
95
95
  match_end = match_start + match.size unless @exceptionlist.empty?
96
96
  unless @exceptionlist.empty? or not protected_by_exceptionlist?(match_start,match_end,text,start_at) then
97
- start_at = match_end + 1
97
+ start_at = match_end + 1 unless @exceptionlist.empty?
98
98
  match
99
99
  else
100
- start_at = match_end + 1
100
+ start_at = match_end + 1 unless @exceptionlist.empty?
101
101
  replace(match)
102
102
  end
103
103
  end
@@ -1,3 +1,3 @@
1
1
  module LanguageFilter
2
- VERSION = "0.2"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: language_filter
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Fritz