improve_typography 0.1.13 → 0.1.14
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/apostrophe.rb +1 -0
- data/lib/improve_typography/processors/double_quotes.rb +1 -0
- data/lib/improve_typography/processors/ellipsis.rb +1 -0
- data/lib/improve_typography/processors/em_dash.rb +1 -0
- data/lib/improve_typography/processors/en_dash.rb +1 -0
- data/lib/improve_typography/processors/multiply_sign.rb +1 -0
- data/lib/improve_typography/processors/nbsp.rb +2 -0
- data/lib/improve_typography/processors/single_quotes.rb +1 -0
- data/lib/improve_typography/processors/units.rb +1 -0
- data/lib/improve_typography/processors/word_line_separator.rb +1 -0
- data/lib/improve_typography/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 050ccf9750f3535176023f6156dd7397130fd1b30c03787f49b5a0a453959f72
|
4
|
+
data.tar.gz: e7a4c3661192eb7a19670e1b4f8c59896be5c16921976ab14dab7be4cc3bcd83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60e078a0c5fc8c35956e407d3ac5fc81fdc9c8cfa0b239b934d6986137e22a1d2b2a81d27f6e445617d6fdf5fb2ab34f733f477d49149ecaf3f454ad5d5039c8
|
7
|
+
data.tar.gz: 9c400979338141b2660c679a0504ca8da41e0a2d7812e57b1d0d66d02a74b3ae61f0d3e1460c40fa41744976a0e0ea5fe5394446ee1042fa63f5b68c14e5e4b5
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,8 @@ module ImproveTypography
|
|
2
2
|
module Processors
|
3
3
|
class Nbsp < Processor
|
4
4
|
def call
|
5
|
+
return str unless str.match?(/(\A|\s+)(\S|\d+)([\.?!]?)(\s+|\z)/)
|
6
|
+
|
5
7
|
str
|
6
8
|
.gsub(/(\s+)(\S|\d+|\S\.)(\s+)(\S)/, '\1\2 \4') # in the middle of string
|
7
9
|
.gsub(/\A(\w|\d+|\w\.)(\s+)(\S)/, '\1 \3') # at the beginning of string
|
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.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Celizna
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|