pragmatic_tokenizer 1.3.0 → 1.3.1

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
  SHA1:
3
- metadata.gz: 74b115265cde89758fa37abfbbe6e5fbf581819e
4
- data.tar.gz: 7074d143fd81022852dca5af10800e1abe93f94e
3
+ metadata.gz: 600855c6a883dea597e6abd87b43721579680fe2
4
+ data.tar.gz: f0dc608d45aac9701b6ded9b5de001cde3b987e9
5
5
  SHA512:
6
- metadata.gz: ef9e49e20912c5e3c5324362dfa834bf7ad1d2a9b6ac83f82366b3863724d9a3be42114d672757e19594792b849b1f50bd2f74f1758e40bac0b88e01b1633b85
7
- data.tar.gz: 79a3cfbd22546a8c7ac90501aa749311f927a8ca4d039d12dc64ec5d8bf5aa3db996ff6c66cbc4b8be8aab512f5d4f7c7b432eb2d2da695d6c586dc373578223
6
+ metadata.gz: 93ac2871c7e053060289f5fd758a090470c5dc7a98a9d68453c965701e425c63ef0825b83715e081e3c69c2d31617efa1738fdca36411537e622b6409d975416
7
+ data.tar.gz: 2ec0fbdbdfdb29f91324853aea7ccd992ec4e3ca04274d97aead2eccc84b819b83e351e5554caac36211040508dfa01f0f8877c73a87a33c79bf5567f580f3f8
@@ -18,6 +18,7 @@ module PragmaticTokenizer
18
18
  shift_colon(text)
19
19
  shift_bracket(text)
20
20
  shift_semicolon(text)
21
+ shift_percent(text)
21
22
  shift_caret(text)
22
23
  shift_hashtag(text)
23
24
  shift_ampersand(text)
@@ -93,6 +94,10 @@ module PragmaticTokenizer
93
94
  text.gsub!(/([;])/o) { ' ' + $1 + ' ' } || text
94
95
  end
95
96
 
97
+ def shift_percent(text)
98
+ text.gsub!(/(?<=\D)%(?=\d+)/, ' %') || text
99
+ end
100
+
96
101
  def shift_caret(text)
97
102
  text.gsub!(/\^/, ' ^ ') || text
98
103
  end
@@ -1,3 +1,3 @@
1
1
  module PragmaticTokenizer
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pragmatic_tokenizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-21 00:00:00.000000000 Z
11
+ date: 2016-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unicode