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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a78335b3908581612768fec1c82a5b51c91b49bef33396acc7ad0e84f76abdb0
4
- data.tar.gz: 4fd09552f71508d0a33226ba8e83352a84c421b96d56e3752a17785ea9e00030
3
+ metadata.gz: 6f471ae42bbfd5489cd51bb8189eb8a4bfb073529e4420640f8d6ec91957f8a8
4
+ data.tar.gz: 4ed197ebff2c40bde249db09c1fe2a437e415c68dcc7ad904e38059f2c4275ed
5
5
  SHA512:
6
- metadata.gz: ce26fd4d64015b4aebfb5df45f46951711eddaa3aa43a542c3d4db0035a7619a7528c7f4fe54cab32576e5eecfcfaa278ea832f83379a5c27b8b9ae95c75f4d0
7
- data.tar.gz: 48bf3ae8c6494b944ffab3ebc627fd499fb590bbf61b549820f5e615e35bb112fb9248715e8861b03ffa5317de94ac4e97ac89075684131450d0c6fd2cc6ffbf
6
+ metadata.gz: 84773469a95e0f28686999ea84feee2ffe5c632552caa96aa5571f8cc2e2a7f89da97c5b1c65abc66c502b48252c53f03f5b7a8e60c3c75c2482cc2e228f6822
7
+ data.tar.gz: dc57e7dd67d623b32a1541faf8eb7cfc4cbef4210961a0bcb93fe4e5a6a58d0449bde63e0cfd2446423e03afa227886dad4e2a6098ebcf1b53d23880440f1fdc
@@ -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
- unless input.include?(head) && input.include?(tail)
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
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Microtypo
5
- VERSION = "1.2.0"
5
+ VERSION = "1.2.1"
6
6
  end
7
7
  end
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.0
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-22 00:00:00.000000000 Z
11
+ date: 2019-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll