yatoc 0.3.0 → 0.3.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: 5eb5256965dbce2125694049499d87d0e54b4b226ab93b9f8130a54cd3f3e907
4
- data.tar.gz: 7ac46c4f4bdd682a737e5cfae82b26fe8a319f2f74ea58795e351357e59e8fd3
3
+ metadata.gz: 40a564c4d8640c24dceb46c1a5c72c65f676ec60ad35abd602ddd3805ba97406
4
+ data.tar.gz: 494e5302f6f6b77a501ac0daae0b89b766ad8fdee7b1c9a0ae7d329c03cb7947
5
5
  SHA512:
6
- metadata.gz: 2b3b8f8e1329c4ec69f14271483d696e1ef602ea05d9dfdca4729d25018d3a283983e775698b5ca29eb958b82bbd71a8f9ca742424398b28ba0cd8b500354bed
7
- data.tar.gz: 5629d9fa2af81b478095397c994e1f15ec7ff691bf55895fdd18bfade656b79eb5653c914b1d5219aa159c5e3c3eae2bf50e35e4accb88734afdfa2c25cc1054
6
+ metadata.gz: 7bcd481f3f4def5a78d9fe286d8d21d7af148ddbe27a77eba5934f117bc21965a016dd9fb06606b0e2cca06cbfff7b27a0fd84ad10a2492daee323e2488db439
7
+ data.tar.gz: 0725357e0c868d61c11f326b5dcb43ee17212e3c6a121382ed4b50132038f700e5c9abbf1896807bd26bad9a85011cd8c30d2d4cfb6c0f90e371cee7abc305a5
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/yatoc.rb CHANGED
@@ -19,31 +19,44 @@ class Yatoc
19
19
  @numbered, @debug, @content = numbered, debug, content
20
20
 
21
21
 
22
- if content =~ /<index[^>]+>/ then
22
+ @to_html = if content =~ /<index[^>]+>/ then
23
23
 
24
24
  @numbered ||= false
25
+ puts '1. ready to gen_index'.info if @debug
25
26
  html2 = gen_index(content)
26
27
  puts 'html2: ' + html2.inspect
27
- @to_html = "%s\n\n<div class='main'>%s</div>" % \
28
+ "%s\n\n<div class='main'>%s</div>" % \
28
29
  [html2, content.sub(/<index[^>]+>/, '')]
29
30
 
30
31
  elsif content =~ /<ix[^>]+>/ then
31
32
 
32
33
  @numbered ||= false
34
+ puts '2. ready to gen_index'.info if @debug
33
35
  html2 = gen_index(content, threshold: nil)
34
36
  puts 'html2: ' + html2.inspect
35
- @to_html = "%s\n\n<div class='main'>%s</div>" % \
37
+ "%s\n\n<div class='main'>%s</div>" % \
36
38
  [html2, content.sub(/<ix[^>]+>/, '')]
37
39
 
38
40
  elsif content.scan(/<h\d+/).length > min_sections
39
41
 
40
42
  @numbered ||= true
43
+ puts 'ready to gen_toc()'.info if @debug
41
44
  gen_toc(content)
42
45
 
46
+ else
47
+
48
+ content
49
+
43
50
  end
44
51
 
52
+
53
+ # note: @to_html is important because this gem is used by the
54
+ # Martile gem which expect to pass HTML through to render any TOCs.
55
+
45
56
  end
46
57
 
58
+ # use in conjunction with the <ix/> tag to render a sidebar
59
+ #
47
60
  def to_css()
48
61
 
49
62
  <<CSS
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yatoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  7RVV+J+oYjvww0tYfGq6N2tECM5thrQYj3cKLzAEEPYBjoWcPA5bqRXBTNta+k+K
36
36
  tc7DELyeAZoKgZBO2wAc4FQ6
37
37
  -----END CERTIFICATE-----
38
- date: 2019-02-02 00:00:00.000000000 Z
38
+ date: 2019-02-03 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: pxindex
metadata.gz.sig CHANGED
Binary file