jekyll-toc-helpers 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9d50c00e9cc13823485adc7dbe4b73d690894d6
4
- data.tar.gz: e085d1d938bf6e3978403742df36263480978e09
3
+ metadata.gz: 608c30c8f8cd598845d37ef34f380d595611483c
4
+ data.tar.gz: 2715010e60299ea7d3977fa0541f94ad2027ac30
5
5
  SHA512:
6
- metadata.gz: 8ca8b82d9bae3f4107f5b25aaa3f58a41159b310a480b035dd179cac026a1910f8e822f9e543a51d7e4861207ab4ab14d814afba8a2617f19fc806c4db97260f
7
- data.tar.gz: da46d2331877d457587d26347f79ccd73e1827df2571ee7fde170060566f2c514d0ed85e211ab06c650de9876a8a5275daab5b7f4e2201f13e165513b9c75061
6
+ metadata.gz: 010051b41bdeb694f80e081e80d29a582b5c84c6cbdc3f770f87e1f1c45b2309a597002fb90a554f3aa171def490bf76897f0e90ff946f2422cf1e42c480c5db
7
+ data.tar.gz: 60e779cf12dea36739287b822f8092069f19d02a721a88cc877221a9eba1370d28eea49322fa0e177f1366aec3ce1f7466ef1139fd8f5959aebad84db8ebb09e
data/.travis.yml CHANGED
@@ -2,5 +2,4 @@ language: ruby
2
2
  rvm:
3
3
  - 2.1
4
4
  - 2.0
5
- - 1.9.3
6
5
  script: "script/cibuild"
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'jekyll-toc-helpers'
6
- spec.version = '0.1.1'
6
+ spec.version = '0.1.2'
7
7
  spec.authors = ['Garen Torikian']
8
8
  spec.email = ['gjtorikian@gmail.com']
9
9
  spec.summary = 'Some helper tags for generating TOCs.'
@@ -33,17 +33,21 @@ module Jekyll
33
33
  list = []
34
34
  datafile = construct_datafile(context, @keys)
35
35
 
36
- datafile.each do |line|
37
- if line.is_a? Hash
38
- line.each_pair do |parent, children|
39
- list << "- [#{parent}](#{Utils.slugify parent})"
40
- children.each do |subsection|
41
- list << " - [#{subsection}](#{Utils.slugify subsection})"
36
+ if datafile
37
+ datafile.each do |line|
38
+ if line.is_a? Hash
39
+ line.each_pair do |parent, children|
40
+ list << "- [#{parent}](#{Utils.slugify parent})"
41
+ children.each do |subsection|
42
+ list << " - [#{subsection}](#{Utils.slugify subsection})"
43
+ end
42
44
  end
45
+ else
46
+ list << "- [#{line}](#{Utils.slugify line})"
43
47
  end
44
- else
45
- list << "- [#{line}](#{Utils.slugify line})"
46
48
  end
49
+ else
50
+ list = []
47
51
  end
48
52
 
49
53
  context.registers[:site].data["toc_#{@id}"] = list.join("\n")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-toc-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-04 00:00:00.000000000 Z
11
+ date: 2015-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -133,4 +133,3 @@ signing_key:
133
133
  specification_version: 4
134
134
  summary: Some helper tags for generating TOCs.
135
135
  test_files: []
136
- has_rdoc: