textutils 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/textutils/core_ext/file.rb +8 -4
- data/lib/textutils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 437a5b912f0a3861ec7a45bb66553274985fb80c
|
4
|
+
data.tar.gz: 246460ab3b009a6ffa0b5039bb986aa2184a461f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee28f3fe54026a7bec9947c108e917d6387b34f6afd19215572466b175511f39a5ec8f48593b3b982f9bb9320bc0d76c464ef0e20e6c06e95a122538b3ddaf86
|
7
|
+
data.tar.gz: abe8967954604649c73848841274eec8f272c7c80af17a26aa7726a15408bac8502479db0091851442da1fa1ce051a25ca07aded4106700b717bfb7d7c6a362c
|
@@ -6,11 +6,15 @@ class File
|
|
6
6
|
file.read
|
7
7
|
end
|
8
8
|
|
9
|
-
##
|
9
|
+
##
|
10
|
+
## todo: make normalize newlines into a filter (for easy (re)use)
|
11
|
+
|
10
12
|
## normalize newlines
|
11
|
-
## always use \n
|
12
|
-
##
|
13
|
-
## convert \r (
|
13
|
+
## always use LF \n (Unix):
|
14
|
+
##
|
15
|
+
## convert CR/LF \r\n (Windows) => \n
|
16
|
+
## convert CR \r (old? Mac) => \n -- still in use?
|
17
|
+
text = text.gsub( /\r\n|\r/, "\n" )
|
14
18
|
|
15
19
|
# NB: for convenience: convert fancy unicode dashes/hyphens to plain ascii hyphen-minus
|
16
20
|
text = TextUtils.convert_unicode_dashes_to_plain_ascii( text, path: path )
|
data/lib/textutils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: textutils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: props
|