card-mod-legacy 0.11.2 → 0.12.0

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: 1688c7502a8f3b9721732c7e88056552646065115beb4b359818dd9c35f81b70
4
- data.tar.gz: 1a4e7b592828d3b130964982d548c4b9ba2c0a313e7ff31615887b4651fbd452
3
+ metadata.gz: b093bdbefb0f621e8f675e607ea15487af4516c95fe6bdad66969b5c558f08cc
4
+ data.tar.gz: 83b5947361c2dc5be11ddcc9ef37e6559aa9121fad5f83c380f377943dfa82df
5
5
  SHA512:
6
- metadata.gz: da4086aa4ddc51d9120da6464e5a1e5cb7b364a355375d1df44321c486c63145eba3cf532c523c95ac18dbef3773d1ca850e08310a30c0768041ea7a4420e089
7
- data.tar.gz: 9213cdaa0eec795e99da65356f5f6fbb5b0c06484ce8c9bdf8b4009c04c4fb5b4a09e28d91ef5369f8c55f2c7603b7c55a7632d229a5f150e7d4dd78506180d9
6
+ metadata.gz: 898fa1e855ff21b6858d9f0ba755fb51972fa345bb6cfe17e2cd179cef89682c874733779bd3690b00c8007e862700a1bf7a647ff374b808999a9e00a24e209e
7
+ data.tar.gz: 738aa91724cb3fcd0d50d6a9274b25c8bc05b4e01ba1eb7fc0b57917e8e0a9b3925d522de5e3f9d91a40f6d25a08f737a9c6b6af131298ad784a44500e290d60
@@ -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,12 +32,13 @@ 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?
38
- item = { value: value, uri: URI.escape(value) }
40
+
41
+ item = { value: value, uri: ERB::Util.url_encode(value) }
39
42
  case tag.downcase
40
43
  when "h1"
41
44
  item[:depth] = dep = 1
@@ -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.2
4
+ version: 0.12.0
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-03-15 00:00:00.000000000 Z
13
+ date: 2021-07-05 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.2
21
+ version: 1.102.0
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.2
28
+ version: 1.102.0
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.0.3
66
+ rubygems_version: 3.2.15
67
67
  signing_key:
68
68
  specification_version: 4
69
69
  summary: legacy