jekyll_aspec 1.0.4 → 1.0.5

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
  SHA1:
3
- metadata.gz: 4a3205ebf05215b44a99926259fb80b71cb67c98
4
- data.tar.gz: 5dc2cd585330335daeaa473f5efb75215a0ae896
3
+ metadata.gz: ee4c7c851c368babd8041e9abf52173d54436ede
4
+ data.tar.gz: 0efa7e337687113a78915cb83c1071f56389efab
5
5
  SHA512:
6
- metadata.gz: 1f9ffe1ffc25bf9b948c407ca643a143533c101c42ce91094ce9f1bd1e9b3d203d1a2b68eac42ee52d424e82513ec4a5c049e0b11835103b0aaafa61a792fe04
7
- data.tar.gz: 2a09731a04bc68daf26c565c8c056e791f280d613413517dddec0df55b45b6ec34343b57faecb665ab5c3dd93d41cb583abd7d84335fc421f5265f3b952ec19d
6
+ metadata.gz: 1ad52cbe7be607276deb122f9ca244e0a2a91252fe579f82c238635dcda8eff64bd9ab9c7b4d4464745ba97e27952ee1610c9bac47925f3fa78fc8f0aff9bbb0
7
+ data.tar.gz: ad989f42bd716aef0920c7099cd8a5432dedcac0f587fe4c63dac1ca5d84899fbd7fbf9b8153c92e2b80a189ef8742f7a4c0b6bf02fd7d670b5f94fa22fe7afe
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jekyll_aspec (1.0.4)
4
+ jekyll_aspec (1.0.5)
5
5
  asciidoctor (>= 1.5.0)
6
6
 
7
7
  GEM
@@ -30,13 +30,14 @@ adoc_files.sort!
30
30
  adoc_files.each do |f|
31
31
  inc = false
32
32
  commented = false
33
-
33
+ i = 0
34
34
  File.read(f).each_line do |li|
35
+ i += 1
35
36
  incommentblock ^= true if li[CommentBlockRx]
36
37
  commented = true if li[CommentLineRx]
37
38
  inc = true if li[/published: false/]
38
39
 
39
- doctitle = /(?<=title:\s).+/.match(li) if li[/^title:\s+\w.+/]
40
+ doctitle = /(?<=title:\s).+/.match(li) if li[/^title:\s+\w.+/] if i < 8
40
41
  chapter = /(?<=chapter:\s).+/.match(li) if li[/^chapter:\s+\w.+/]
41
42
 
42
43
  if li[/\[\s*req\s*,\s*id\s*=\s*\w+-?[0-9]+\s*,.*/]
@@ -82,7 +83,9 @@ reqs.uniq!
82
83
  i = 0
83
84
  reqs.each do |req, f, title, chapter, doctitle|
84
85
  i += 1
85
-
86
+ # TODO - find better solution for sanitized titles:
87
+ title = title.gsub(/\`/, '').gsub(/\'/, '').gsub(/\*/, '')
88
+
86
89
  id = /[^,]*\s*id\s*=\s*(\w+-?[0-9]+)\s*,.*/.match(req)[1]
87
90
  version = /(?<=version=)\d+/.match(req)
88
91
 
@@ -22,7 +22,7 @@ Extensions.register do
22
22
  # &quot; = "
23
23
  # &amp; = &
24
24
  downcased_title = attrs['title'].downcase.tr(' ', '_').gsub('"', '&quot;')
25
- san_title = attrs['title'].gsub(/&/, '&amp;')
25
+ san_title = attrs['title'].gsub(/&/, '&amp;').gsub(/\`/, '').gsub(/\'/, '').gsub(/\*/, '')
26
26
  rescue Exception => msg
27
27
  puts msg
28
28
  # If no title exists on the Req block, throw an exception
@@ -2,5 +2,5 @@
2
2
  module JekyllAspec
3
3
  # After updating the version, publishing can be done by running
4
4
  # rake release in the project root
5
- VERSION = '1.0.4'.freeze
5
+ VERSION = '1.0.5'.freeze
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_aspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - bsmith-n4