sixarm_ruby_markdown_table_of_contents 2.4.0 → 2.5.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: a54c2cd830e7b301beaa467b0a930205dadfe364d7c64d9022a09e4000fbe857
4
- data.tar.gz: fcc89b66c629c83e85f5102c7aa098b4fda4b354cfec55202181da0003c50b8a
3
+ metadata.gz: 026d1ec1149a83109cb777cdf75883b106b70ad4d45ce03e18cd407e9551ba5b
4
+ data.tar.gz: b3258c73e7f2667425898e25023f1ef8f37562c1548bd5a1f4619d625030496c
5
5
  SHA512:
6
- metadata.gz: 653b33b8a22c8cff112f32df430dc9a77a612b3afde05e0abcf6a46d199e76ff598852bd8f4167f235c0fb82fdde28fd84bb479574690217796212e4fc979d8f
7
- data.tar.gz: 97f3563d4639c0d81fbdfa1c21b19a14f886b971b6512e4b76ce35dec96363310cae1e35416dfd5c0aa69199c8518e65158946be037a9e4f60bd91f5d186748c
6
+ metadata.gz: a1c53b2dd35ce9e244f8b03cc72a03d50d975b525239c620bc4960b237a004528e6f945c96e121fa59648e9c86326de1af4c9e3679e59a3d77c7d04aa64c9116
7
+ data.tar.gz: 77f5da2352aa747b15ada404d9206537248adf719ac2271d9fda9438d0768361a9514a6bad51526b5817964ee3a607ba6c775b70a3bc89e200e96ca5e7f56905
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -20,10 +20,10 @@ class SixArm::Markdown::TOC::Generator
20
20
 
21
21
  def scan_headlines(markdown_string)
22
22
  headlines = []
23
- markdown_string.scan(settings.headline_regexp).each{|markers, text|
24
- level = markers.length
25
- if level >= settings.headline_minimum_level && level <= settings.headline_maximum_level
26
- headlines << SixArm::Markdown::Headline.new(level: level, text: text)
23
+ markdown_string.scan(settings.headline_regexp).each{|line|
24
+ headline = SixArm::Markdown::Headline::parse_line(line.chomp)
25
+ if headline.level >= settings.headline_minimum_level && headline.level <= settings.headline_maximum_level
26
+ headlines << headline
27
27
  end
28
28
  }
29
29
  return headlines
@@ -12,7 +12,7 @@ class SixArm::Markdown::TOC:: Settings
12
12
  DefaultLinePrefix = ""
13
13
  DefaultHeadlineMinimumLevel = 2
14
14
  DefaultHeadlineMaximumLevel = 6
15
- DefaultHeadlineRegexp = /^(#+) +(.+)\n/
15
+ DefaultHeadlineRegexp = /^ *[#=]+ *.+? *[#=]* *\n/
16
16
  DefaultContentsRegexp = /(^ *\* \[.*?\]\(#.*?\) *\n)+/m
17
17
 
18
18
  attr_accessor \
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sixarm_ruby_markdown_table_of_contents
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - SixArm
@@ -39,7 +39,7 @@ cert_chain:
39
39
  tzpk/VnZXj7Ek/earx+N/Z+Wtnl2xENm5IF8SFPeI1HFa9NH47pqtxF1YKpNIEVc
40
40
  2xa2BNHSePe7tys/2hbmZuyMu8X5ERmovsabSXB3a+YwtJh5c2jhA21wF7986s0q
41
41
  -----END CERTIFICATE-----
42
- date: 2018-02-12 00:00:00.000000000 Z
42
+ date: 2018-02-16 00:00:00.000000000 Z
43
43
  dependencies:
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: sixarm_ruby_markdown
@@ -47,7 +47,7 @@ dependencies:
47
47
  requirements:
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: '2'
50
+ version: 2.1.3
51
51
  - - "<"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '3'
@@ -57,7 +57,7 @@ dependencies:
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: '2'
60
+ version: 2.1.3
61
61
  - - "<"
62
62
  - !ruby/object:Gem::Version
63
63
  version: '3'
@@ -204,6 +204,7 @@ licenses:
204
204
  - BSD-3-Clause
205
205
  - CC-BY-NC-SA-4.0
206
206
  - AGPL-3.0
207
+ - EPL-1.0
207
208
  - GPL-2.0
208
209
  - GPL-3.0
209
210
  - LGPL-3.0
@@ -227,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
228
  version: '0'
228
229
  requirements: []
229
230
  rubyforge_project:
230
- rubygems_version: 2.7.3
231
+ rubygems_version: 2.7.6
231
232
  signing_key:
232
233
  specification_version: 4
233
234
  summary: SixArm.com → Ruby → Mardown table of contents
metadata.gz.sig CHANGED
Binary file