card-mod-legacy 0.11.3 → 0.11.7

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: 1a0dfd961733fb9afc657b74286dbd9a9b4c5d3360f866821e1078b9f5b40459
4
- data.tar.gz: 1a87846bde50c390746de4500195bbe651aca08380673964faed71d619787560
3
+ metadata.gz: deac5b3f6d2253f6f9864f8c0aab18aad80fdc5ee68645c655cd16a5b479d926
4
+ data.tar.gz: 4081df37abbd72c11ddde3ba04cb990d04d67d174873f9f2044a6ecb697a6a89
5
5
  SHA512:
6
- metadata.gz: 9d19a81b4f8c0eccea1dc98d53d9e25dbb2db44ceca5e1d36e2731380e692b09beadb7bea4010fe55ab454a033cd5e37266a58a3f1d382fe056b39651c073718
7
- data.tar.gz: 06f61005ea74f118255907b60e5d927ba95f5d1e5cc803118829a152b456e19bbe50e21b1296bbe5e4f179e0622210ed6497af254b063bbd42a25d18aecc66b6
6
+ metadata.gz: 76d8aa592e26a5d1b0aab2c2bbbd010f57a310498ce4edb6f01ec7a183801f3a75a891e923fb4375266000f5549216fe40d8cde258404a9b8c4c9fab899dbdcc
7
+ data.tar.gz: 84d42472a0a8700474b67757429f609c58af5107c182f2171a2e7c4127038b633eabc6b3c390cff24ccc46bebf975415b274330bfd90d04bed772061529ff52c
@@ -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
- %( <div class="table-of-contents"> <h5>#{tr(:toc)}</h5> ) +
22
- make_table_of_contents_list(toc) + "</div>" + content
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!(/<(h\d)>(.*?)<\/h\d>/i) do |match|
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>" + list + "</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.3
4
+ version: 0.11.7
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-04-01 00:00:00.000000000 Z
13
+ date: 2021-08-01 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.3
21
+ version: 1.101.7
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.3
28
+ version: 1.101.7
29
29
  description: ''
30
30
  email:
31
31
  - info@decko.org
@@ -63,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  - !ruby/object:Gem::Version
64
64
  version: '0'
65
65
  requirements: []
66
- rubygems_version: 3.1.4
66
+ rubygems_version: 3.1.6
67
67
  signing_key:
68
68
  specification_version: 4
69
69
  summary: legacy