text_clean 0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/text_clean/text_clean.cc +6 -2
- data/lib/text_clean/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73936fded6a20b6fdde25a06bd5cb74b830177c1
|
4
|
+
data.tar.gz: 7fc77b21e64fad053e1e56f1245ddf70d7b59195
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 596c250db5028aaaaa71c7290e160706e08365b63ba6d9b9aed79ecc03ccea965e6380dfe7709e578fd4ac6f32a733c29d6d07bfdee60a3a41d863bd94bf936f
|
7
|
+
data.tar.gz: 399449bc2bb5c8fafed2a435446488592ad62eb05eda659d1dd4f8338c07280091bcf604f482725b46367b3daa7e1baac73b16530c02d5950f26cfb9f03ca3c3
|
@@ -45,8 +45,12 @@ size_t text_clean_cstr(char* text, long len, char line_sep)
|
|
45
45
|
if (c == '-') {
|
46
46
|
// double dash?
|
47
47
|
if (*(read + 1) == '-') {
|
48
|
-
|
49
|
-
|
48
|
+
if (!just_added_space) {
|
49
|
+
*write++ = ' ';
|
50
|
+
read++;
|
51
|
+
just_added_space = true;
|
52
|
+
just_added_period = false;
|
53
|
+
}
|
50
54
|
} else {
|
51
55
|
// scan ahead to see if this is a hyphen at the end of the line
|
52
56
|
char* scan_ahead;
|
data/lib/text_clean/version.rb
CHANGED