ssmd 0.7.4 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ssmd/processors/break_processor.rb +13 -0
- data/lib/ssmd/processors/processor.rb +8 -6
- data/lib/ssmd/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecf3d2d52ae18bc5e1c7c996801388fa512866e3495ba546d6258124834c758d
|
4
|
+
data.tar.gz: 951665f3407e4af8b3bf7fd8d6a595fe5c0be4f157ddf7aabf8ce7a0f23d1b0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e95c06cdafd4d7f1db0b9ef48178113f16fc965230532e8881dbb156e8610595bd934dcc44688bb9cbf9c7681f24d2793e758563147efc9b90cf56b05628f647
|
7
|
+
data.tar.gz: 94066e29be12d5a3878de87a8718e7922eeda54865b46cd915eedd8d9891e5c4f3f23e34cdfc5a0aaa6065882245881d2bd39051cf864f81d6accb554b1cd85d
|
@@ -35,5 +35,18 @@ module SSMD::Processors
|
|
35
35
|
["strength", "x-strong"]
|
36
36
|
end
|
37
37
|
end
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
def join_parts(prefix, text, suffix)
|
42
|
+
leading_ws = /\A\s/
|
43
|
+
trailing_ws = /\s\z/
|
44
|
+
|
45
|
+
if prefix =~ trailing_ws && suffix =~ leading_ws && text == ""
|
46
|
+
prefix.sub(trailing_ws, "") + suffix
|
47
|
+
else
|
48
|
+
super
|
49
|
+
end
|
50
|
+
end
|
38
51
|
end
|
39
52
|
end
|
@@ -13,15 +13,11 @@ module SSMD::Processors
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def substitute(input)
|
16
|
-
if match
|
17
|
-
[match.pre_match, result, match.post_match].join
|
18
|
-
end
|
16
|
+
join_parts match.pre_match, result, match.post_match if match
|
19
17
|
end
|
20
18
|
|
21
19
|
def strip_ssmd(input)
|
22
|
-
if match
|
23
|
-
[match.pre_match, text, match.post_match].join
|
24
|
-
end
|
20
|
+
join_parts match.pre_match, text, match.post_match if match
|
25
21
|
end
|
26
22
|
|
27
23
|
def text
|
@@ -39,5 +35,11 @@ module SSMD::Processors
|
|
39
35
|
def warnings
|
40
36
|
@warnings ||= []
|
41
37
|
end
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
def join_parts(prefix, text, suffix)
|
42
|
+
[prefix, text, suffix].join
|
43
|
+
end
|
42
44
|
end
|
43
45
|
end
|
data/lib/ssmd/version.rb
CHANGED