card-mod-legacy 0.11.1 → 0.11.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/set/abstract/table_of_contents.rb +9 -6
- data/set/type/basic.rb +1 -1
- metadata +11 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46f95a3cc3a56f34ad30ae38af3769833147b9f900fbf7c8c723b63e5e9c3471
|
4
|
+
data.tar.gz: 6d4da98d99a19434c715f54e9f0bd25e2435373ebbd6d16c2f84911c91db04c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60c076c1e475a2e85d1e6e0cc47f8b04408bd1e1c9b54c04cf0434d4c3ddf277c5394883d621ac454d5edbde3eb06e6d858efb53e372a27d28cd41f49504a5fe
|
7
|
+
data.tar.gz: f424aa3bc22440ce48bd7e733725f64da549121de6c1c8303fbdbcb21168e0185c2cdf613a3ce25870f9f505c14f18abe87af1e52c8b8b66c1eead01c4ea4609
|
@@ -17,10 +17,12 @@ format :html do
|
|
17
17
|
toc = toc_items content
|
18
18
|
return unless toc.flatten.length >= toc_minimum
|
19
19
|
|
20
|
-
content.replace(
|
21
|
-
|
22
|
-
|
23
|
-
|
20
|
+
content.replace(%(
|
21
|
+
<div class="table-of-contents">
|
22
|
+
<h5>#{t :legacy_toc}</h5>
|
23
|
+
#{make_table_of_contents_list toc}
|
24
|
+
</div>#{content}
|
25
|
+
))
|
24
26
|
end
|
25
27
|
|
26
28
|
def toc_minimum
|
@@ -30,11 +32,12 @@ format :html do
|
|
30
32
|
def toc_items content
|
31
33
|
toc = []
|
32
34
|
dep = 1
|
33
|
-
content.gsub!(
|
35
|
+
content.gsub!(%r{<(h\d)>(.*?)</h\d>}i) do |match|
|
34
36
|
if $LAST_MATCH_INFO
|
35
37
|
tag, value = $LAST_MATCH_INFO[1, 2]
|
36
38
|
value = strip_tags(value).strip
|
37
39
|
next if value.empty?
|
40
|
+
|
38
41
|
item = { value: value, uri: URI.escape(value) }
|
39
42
|
case tag.downcase
|
40
43
|
when "h1"
|
@@ -59,6 +62,6 @@ format :html do
|
|
59
62
|
%(<li><a href="##{i[:uri]}"> #{i[:value]}</a></li>)
|
60
63
|
end
|
61
64
|
end.join("\n")
|
62
|
-
"<ol
|
65
|
+
"<ol>#{list}</ol>"
|
63
66
|
end
|
64
67
|
end
|
data/set/type/basic.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
include_set Abstract::TableOfContents
|
1
|
+
include_set Abstract::TableOfContents
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card-mod-legacy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-05-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: card
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.101.
|
21
|
+
version: 1.101.6
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 1.101.
|
28
|
+
version: 1.101.6
|
29
29
|
description: ''
|
30
30
|
email:
|
31
31
|
- info@decko.org
|
@@ -38,10 +38,15 @@ files:
|
|
38
38
|
- set/self/default_html_view.rb
|
39
39
|
- set/self/table_of_contents.rb
|
40
40
|
- set/type/basic.rb
|
41
|
-
homepage:
|
41
|
+
homepage: https://decko.org
|
42
42
|
licenses:
|
43
43
|
- GPL-3.0
|
44
44
|
metadata:
|
45
|
+
source_code_uri: https://github.com/decko-commons/decko
|
46
|
+
homepage_uri: https://decko.org
|
47
|
+
bug_tracker_uri: https://github.com/decko-commons/decko/issues
|
48
|
+
wiki_uri: https://decko.org
|
49
|
+
documentation_url: http://docs.decko.org/
|
45
50
|
card-mod: legacy
|
46
51
|
post_install_message:
|
47
52
|
rdoc_options: []
|
@@ -58,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
63
|
- !ruby/object:Gem::Version
|
59
64
|
version: '0'
|
60
65
|
requirements: []
|
61
|
-
rubygems_version: 3.
|
66
|
+
rubygems_version: 3.1.4
|
62
67
|
signing_key:
|
63
68
|
specification_version: 4
|
64
69
|
summary: legacy
|