docubot 0.2 → 0.2.1

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.
@@ -20,7 +20,7 @@ module FileUtils
20
20
  end
21
21
 
22
22
  module DocuBot
23
- VERSION = '0.2'
23
+ VERSION = '0.2.1'
24
24
  DIR = File.expand_path( File.dirname( __FILE__ ) )
25
25
 
26
26
  TEMPLATE_DIR = DIR / 'docubot/templates'
@@ -35,9 +35,9 @@ class DocuBot::Bundle
35
35
  # TODO: Move this bloat elsewhere.
36
36
  if page.toc?
37
37
  html = page.to_html
38
- page.toc.scan /[a-z][\w.:-]*/ do |id|
38
+ page.toc.scan /[a-z][\w.:-]*/i do |id|
39
39
  # TODO: Maybe a lightweight HTML parser would be faster here? (Certainly more robust.)
40
- if title = html[/\bid *= *['"]#{id}['"][^>]*>([^<]+)/,1]
40
+ if title = html[/\b(?:id|ID) *= *['"]#{id}['"][^>]*>([^<]+)/,1]
41
41
  page << DocuBot::SubLink.new( page, title.strip, id )
42
42
  else
43
43
  warn "Could not find requested toc anchor '##{id}' on #{page.html_path}"
@@ -31,7 +31,7 @@ class DocuBot::CHMWriter < DocuBot::HTMLWriter
31
31
 
32
32
  # Spin a new thread so it doesn't hold up the Ruby process, but sleep long enough for it to get going.
33
33
  Thread.new{ `hh.exe "#{FileUtils.win_path @chm_path}"` }
34
- sleep 0.1
34
+ sleep 0.1 if Object.const_defined? "Encoding" # This sleep does not help on 1.8.6
35
35
  end
36
36
 
37
37
  def write_hhc
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docubot
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.2"
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin Kistner
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-01-14 00:00:00 -07:00
13
+ date: 2010-01-15 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency