yatoc 0.2.3 → 0.2.4
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
- checksums.yaml.gz.sig +0 -0
- data/lib/yatoc.rb +10 -4
- data.tar.gz.sig +0 -0
- metadata +2 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 39affb3116e586f5382ba8d98504bb5e38ddd24c975f7523e298e374f70eacb4
|
|
4
|
+
data.tar.gz: '081f90c89281c13e0d52fc3117cfa7191286a2a086b1011bc26fdf01c8f88ff5'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf89f24dabea1385e23fa88da907d6780aae991d049252d15635a2c5d1e15140ef269e9b24211f301b4d7786fa0db6db96e88b4f1bc879825ad60b11e0b5bc54
|
|
7
|
+
data.tar.gz: 42b8bf8b5c78742b2be9fe1b1050b41c84a88e85118c487bdbddd1feb40cb30c5c4e744bbe90f4c2fccec0e2310ba727b0af4acc62597d327fe660f4f96483f1
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/yatoc.rb
CHANGED
|
@@ -17,13 +17,19 @@ class Yatoc
|
|
|
17
17
|
|
|
18
18
|
@numbered, @debug, @html = numbered, debug, html
|
|
19
19
|
|
|
20
|
-
@to_html = if html
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
@to_html = if html =~ /<index[^>]+>/ then
|
|
21
|
+
|
|
22
|
+
html2 = gen_index(html)
|
|
23
|
+
puts 'html2: ' + html2.inspect
|
|
24
|
+
html.sub(/<index[^>]+>/, "\n" + html2 + "\n")
|
|
25
|
+
|
|
26
|
+
elsif html.scan(/<h\d+/).length > min_sections
|
|
27
|
+
|
|
28
|
+
gen_toc(html)
|
|
23
29
|
|
|
24
30
|
else
|
|
25
31
|
html
|
|
26
|
-
end
|
|
32
|
+
end
|
|
27
33
|
|
|
28
34
|
end
|
|
29
35
|
|
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.2.
|
|
4
|
+
version: 0.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -103,8 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
103
103
|
- !ruby/object:Gem::Version
|
|
104
104
|
version: '0'
|
|
105
105
|
requirements: []
|
|
106
|
-
|
|
107
|
-
rubygems_version: 2.7.6
|
|
106
|
+
rubygems_version: 3.0.2
|
|
108
107
|
signing_key:
|
|
109
108
|
specification_version: 4
|
|
110
109
|
summary: Yet Another Table Of Contents HTML generator.
|
metadata.gz.sig
CHANGED
|
Binary file
|