jekyll-microtypo 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/jekyll/microtypo.rb +20 -1
- data/lib/jekyll/microtypo/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: 6f471ae42bbfd5489cd51bb8189eb8a4bfb073529e4420640f8d6ec91957f8a8
|
4
|
+
data.tar.gz: 4ed197ebff2c40bde249db09c1fe2a437e415c68dcc7ad904e38059f2c4275ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84773469a95e0f28686999ea84feee2ffe5c632552caa96aa5571f8cc2e2a7f89da97c5b1c65abc66c502b48252c53f03f5b7a8e60c3c75c2482cc2e228f6822
|
7
|
+
data.tar.gz: dc57e7dd67d623b32a1541faf8eb7cfc4cbef4210961a0bcb93fe4e5a6a58d0449bde63e0cfd2446423e03afa227886dad4e2a6098ebcf1b53d23880440f1fdc
|
data/lib/jekyll/microtypo.rb
CHANGED
@@ -33,27 +33,46 @@ module Jekyll
|
|
33
33
|
|
34
34
|
def recursive_parser(input, locale, bucket, index)
|
35
35
|
input = input.to_s
|
36
|
+
|
37
|
+
# prefix = " " + (" " * 3 * (QUEUE.size-index))
|
38
|
+
# p prefix + 'Recursive_parser for ' + input unless index.zero?
|
39
|
+
# p prefix + ' Fix microtypo for ' + input if index.zero?
|
40
|
+
# p prefix + ' and place it in the bucket' if index.zero?
|
36
41
|
return fix_microtypo(+input, locale, bucket) if index.zero?
|
37
42
|
|
38
43
|
index -= 1
|
39
44
|
head, tail, flag = QUEUE[index]
|
40
45
|
|
41
|
-
|
46
|
+
indexHead = input.index(head)
|
47
|
+
indexTail = input.index(tail)
|
48
|
+
|
49
|
+
if indexHead.nil? || indexTail.nil? || indexHead > indexTail
|
50
|
+
# p prefix + input
|
51
|
+
# p prefix + 'doest not contain '+head+' then '+tail
|
42
52
|
return recursive_parser(input, locale, bucket, index)
|
43
53
|
end
|
44
54
|
|
55
|
+
# p prefix + input
|
56
|
+
# p prefix + 'contains '+head+' and '+tail
|
57
|
+
# p prefix + 'cuts the input in parts around '+ head
|
45
58
|
input.split(head).each do |item|
|
46
59
|
item = item.to_s
|
47
60
|
|
61
|
+
# p prefix + '-----part----'
|
62
|
+
# p prefix + item
|
63
|
+
|
48
64
|
if item.include?(tail)
|
65
|
+
# p prefix + 'contains '+tail
|
49
66
|
end_items = item.split(tail)
|
50
67
|
|
68
|
+
# p prefix + end_items.to_s
|
51
69
|
if flag
|
52
70
|
bucket << head << end_items[0] << tail
|
53
71
|
else
|
54
72
|
bucket << end_items[0]
|
55
73
|
end
|
56
74
|
|
75
|
+
# p prefix + bucket.to_s
|
57
76
|
item = end_items.last
|
58
77
|
end
|
59
78
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-microtypo
|
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
|
- Boris Schapira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|