improve_typography 0.1.0 → 0.1.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: f5b3b3bf0752a4501e4412ef570b94d69b527c27
4
- data.tar.gz: e3bd253d727c4cfc48edc76e97d497a718e095a1
3
+ metadata.gz: 03d5e758657b4cb10506cad154ed463073804ab9
4
+ data.tar.gz: 94308cf526d0b7e39efe4d2523d19c5e8b498ff3
5
5
  SHA512:
6
- metadata.gz: 43cf82d01e7aa50d8eb8abd4c19d3caa3a31739f4762598ae3353d2e10d2bc513b5e39a48f56dc4024b90d76f75e54caeeb937f18f5f7fea9b64a4c0f93d64b3
7
- data.tar.gz: 52fa0221abc1a9a085c7327de4e6082fa6cc93cbeb1024e8084b9b6293e9410fad6172844e21608927630db862f66e30326665f4eda1daf9d627a88df0ee86bb
6
+ metadata.gz: f08649e7ee2d4e5d01b5616b0b7fa0d369376850a7803f4a6d2f1fd1027f4e17841406ac5d1e9db57599eed1f048f354231645981e6bc3b0dc72515c04571050
7
+ data.tar.gz: 81d337f5501d43d90a4cd613a82cf68b20e8f3f58104b321f15ab0b635182fd76b0945519d67915e81ec9842e7416834265ca2baf39db4ba53f6680cd1810b9c
data/README.md CHANGED
@@ -92,6 +92,7 @@ ImproveTypography::Base.call("'so it isn't authorless'", processors: [ImproveTyp
92
92
  * `EmDash`
93
93
  * `EnDash`
94
94
  * `MultiplySign`
95
+ * `Nbsp`
95
96
  * `Numbers`
96
97
  * `SingleQuotes`
97
98
  * `Units`
@@ -0,0 +1,9 @@
1
+ module ImproveTypography
2
+ module Processors
3
+ class Nbsp < Processor
4
+ def call
5
+ str.gsub(/(\s+)(.|\d+|.\.)(\s+)(.)/, '\1\2&nbsp;\4')
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module ImproveTypography
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: improve_typography
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Celizna
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-08 00:00:00.000000000 Z
11
+ date: 2017-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -137,6 +137,7 @@ files:
137
137
  - lib/improve_typography/processors/em_dash.rb
138
138
  - lib/improve_typography/processors/en_dash.rb
139
139
  - lib/improve_typography/processors/multiply_sign.rb
140
+ - lib/improve_typography/processors/nbsp.rb
140
141
  - lib/improve_typography/processors/numbers.rb
141
142
  - lib/improve_typography/processors/single_quotes.rb
142
143
  - lib/improve_typography/processors/units.rb