erbook 7.1.1 → 7.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -75,29 +75,27 @@ module ERBook
75
75
  :@stack => [], # stack for all nodes
76
76
  }.each_pair {|k,v| sandbox.instance_variable_set(k, v) }
77
77
 
78
+ #:stopdoc:
79
+
78
80
  ##
79
81
  # Handles the method call from a node
80
82
  # placeholder in the input document.
81
83
  #
82
84
  def sandbox.__node_impl__ node_type, *node_args, &node_content
83
85
  node = Node.new(
84
- :type => node_type,
85
- :defn => @format['nodes'][node_type],
86
- :args => node_args,
87
- :children => [],
88
-
89
- # omit erbook internals from the stack trace
90
- :trace => caller.reject {|t|
91
- [$0, ERBook::INSTALL].any? {|f| t.index(f) == 0 }
92
- }
86
+ :type => node_type,
87
+ :defn => @format['nodes'][node_type],
88
+ :args => node_args,
89
+ :trace => caller,
90
+ :children => []
93
91
  )
94
92
  @nodes << node
95
93
  @nodes_by_type[node.type] << node
96
94
 
97
95
  # calculate occurrence number for this node
98
96
  if node.defn['number']
99
- @count ||= Hash.new {|h,k| h[k] = []}
100
- node.number = (@count[node.type] << node).length
97
+ @count_by_type ||= Hash.new {|h,k| h[k] = 0 }
98
+ node.number = (@count_by_type[node.type] += 1)
101
99
  end
102
100
 
103
101
  # assign node family
@@ -138,6 +136,8 @@ module ERBook
138
136
  nil
139
137
  end
140
138
 
139
+ #:startdoc:
140
+
141
141
  @node_defs.each_key do |type|
142
142
  # XXX: using a string because define_method()
143
143
  # does not accept a block until Ruby 1.9
data/lib/erbook/rdoc.rb CHANGED
@@ -142,14 +142,19 @@ module RDoc
142
142
  class DummyOptions #:nodoc:
143
143
  include DummyMixin
144
144
 
145
- def quiet # supress '...c..m...' output on STDERR
145
+ # supress '...c..m...' output on STDERR
146
+ def quiet
146
147
  true
147
148
  end
148
149
  end
149
150
 
150
151
  class DummyMarkup #:nodoc:
151
- require 'rdoc/generators/html_generator'
152
- include Generators::MarkUp
153
- include DummyMixin
152
+ require 'rdoc/generator/markup'
153
+ include Generator::Markup
154
+
155
+ def formatter
156
+ require 'rdoc/markup/to_html'
157
+ Markup::ToHtml.new
158
+ end
154
159
  end
155
160
  end
@@ -69,6 +69,11 @@ class String
69
69
  while html.gsub! %r{(<pre>)<code>(.*?)</code>(</pre>)}m, '\1\2\3'
70
70
  end
71
71
 
72
+ # allow "code spans" annotated with Maruku's IAL (Inline
73
+ # Attribute List) Markdown extension to be syntax colored
74
+ while html.gsub! %r{<pre[^>]+>(<code[^>]+>.*?</code>)</pre>}m, '\1'
75
+ end
76
+
72
77
  # allow user to type <pre> blocks on single lines
73
78
  # without affecting the display of their content
74
79
  html.gsub! %r{(<pre>)[ \t]*\r?\n|\r?\n[ \t]*(</pre>)}, '\1\2'
data/lib/erbook.rb CHANGED
@@ -9,15 +9,14 @@ require 'inochi'
9
9
 
10
10
  Inochi.init :ERBook,
11
11
  :program => 'erbook',
12
- :version => '7.1.1',
13
- :release => '2009-09-06',
12
+ :version => '7.3.0',
13
+ :release => '2009-10-09',
14
14
  :website => 'http://snk.tuxfamily.org/lib/erbook/',
15
15
  :tagline => 'Write books, manuals, and documents in eRuby',
16
16
  :require => {
17
17
  'ember' => '~> 0', # for eRuby template processing
18
18
  'maruku' => '~> 0.5', # for Markdown to XHTML conversion
19
19
  'coderay' => '>= 0.8', # for syntax coloring of source code
20
- 'rainpress' => '~> 1', # for minifying CSS
21
20
  'haml' => '>= 2.2.2', # for generating HTML and CSS
22
21
  'mime-types' => '>= 1.16', # for detecting MIME types
23
22
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erbook
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.1
4
+ version: 7.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suraj N. Kurapati
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-06 00:00:00 -07:00
12
+ date: 2009-10-09 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -33,44 +33,34 @@ dependencies:
33
33
  version: "0.5"
34
34
  version:
35
35
  - !ruby/object:Gem::Dependency
36
- name: haml
36
+ name: coderay
37
37
  type: :runtime
38
38
  version_requirement:
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 2.2.2
43
+ version: "0.8"
44
44
  version:
45
45
  - !ruby/object:Gem::Dependency
46
- name: mime-types
46
+ name: haml
47
47
  type: :runtime
48
48
  version_requirement:
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: "1.16"
54
- version:
55
- - !ruby/object:Gem::Dependency
56
- name: rainpress
57
- type: :runtime
58
- version_requirement:
59
- version_requirements: !ruby/object:Gem::Requirement
60
- requirements:
61
- - - ~>
62
- - !ruby/object:Gem::Version
63
- version: "1"
53
+ version: 2.2.2
64
54
  version:
65
55
  - !ruby/object:Gem::Dependency
66
- name: coderay
56
+ name: mime-types
67
57
  type: :runtime
68
58
  version_requirement:
69
59
  version_requirements: !ruby/object:Gem::Requirement
70
60
  requirements:
71
61
  - - ">="
72
62
  - !ruby/object:Gem::Version
73
- version: "0.8"
63
+ version: "1.16"
74
64
  version:
75
65
  - !ruby/object:Gem::Dependency
76
66
  name: inochi
@@ -92,9 +82,9 @@ dependencies:
92
82
  - !ruby/object:Gem::Version
93
83
  version: "1"
94
84
  version:
95
- description: " ERBook 7.1.1\n\n Write books, manuals, and documents in eRuby\n\n http://snk.tuxfamily.org/lib/erbook/\n\n ERBook is an extensible document processor that emits [1]any\n document you can imagine from [2]eRuby templates, which allow\n scripting and dynamic content generation.\n\n\
96
- Version 7.1.1 (2009-09-06)\n\n This release improves support for Microsoft, Opera, and\n Webkit web browsers in the XHTML format, revises the code and\n documentation, and fixes some bugs.\n\n * [3]Bug fixes\n\n * [4]Housekeeping\n\n Bug fixes\n\n * Restore support for Microsoft web browsers by removing\n the optimization of storing image data URIs in XML\n entities. See [5]Serve XHTML as HTML for Microsoft web\n browsers for the consequences of this change.\n\n * The screen did not scroll during reveal_hash() in Webkit\n browsers.\n\n * The prevent_jump option of set_hash() did not work for\n Opera and Microsoft browsers.\n\n * Use text descriptions instead of graphical symbols in the\n ALT fields of navigation menu images.\n\n * The Abstract was not in the prev/next navigation chain.\n\n Housekeeping\n\n * Open source is for fun, so [6]be nice: speak of \"related\n works\" instead of \"competitors\".\n\n * Fix warning about $logo and $feeds being used when not\n defined.\n\n * Include project website URL in \"generator\" HTML meta\n field.\n\n * Emit project license above JavaScript code in XHTML\n output.\n\n * Lots of other clean up in the documentation and the XHTML\n format.\n\n\
97
- References\n\n 1. http://snk.tuxfamily.org/lib/erbook/#HelloWorld\n 2. http://en.wikipedia.org/wiki/ERuby\n 3. http://snk.tuxfamily.org/lib/erbook/#Bug-fixes\n 4. http://snk.tuxfamily.org/lib/erbook/#Housekeeping\n 5. http://snk.tuxfamily.org/lib/erbook/#Serve-XHTML-as-HTML-for-Microsoft-web-browsers\n 6. http://loiclemeur.com/english/2009/03/never-criticize-your-competitors.html\n"
85
+ description: " ERBook 7.3.0\n\n Write books, manuals, and documents in eRuby\n\n http://snk.tuxfamily.org/lib/erbook/\n\n ERBook is an extensible document processor that emits [1]any\n document you can imagine from [2]eRuby templates, which allow\n scripting and dynamic content generation.\n\n\
86
+ Version 7.3.0 (2009-10-09)\n\n This release improves the printer friendliness of the XHTML\n format.\n\n * [3]New features\n\n * [4]Bug fixes\n\n * [5]Housekeeping\n\n New features\n\n * Do not omit ERBook internals from node stack traces.\n\n * Hide \"printer friendly\" toggle checkbox when printing\n (but not when viewing the \"printer friendly\" mode on the\n computer screen).\n\n * Hide the \"About\" section in \"printer friendly\" mode.\n\n Bug fixes\n\n * Page scrolled to wrong location when links in the table\n of contents in the \"printer friendly\" mode were clicked.\n\n * Print style was not used when printing from \"printer\n friendly\" mode.\n\n * Sans-serif font was not used in headings in print style.\n\n Housekeeping\n\n * Use Ember syntax in [6]Input document for HelloWorld\n format example.\n\n\
87
+ References\n\n 1. http://snk.tuxfamily.org/lib/erbook/#HelloWorld\n 2. http://en.wikipedia.org/wiki/ERuby\n 3. http://snk.tuxfamily.org/lib/erbook/#New-features\n 4. http://snk.tuxfamily.org/lib/erbook/#Bug-fixes\n 5. http://snk.tuxfamily.org/lib/erbook/#Housekeeping\n 6. http://snk.tuxfamily.org/lib/erbook/#HelloWorld-input\n"
98
88
  email: sunaku@gmail.com
99
89
  executables:
100
90
  - erbook
@@ -218,7 +208,9 @@ files:
218
208
  - doc/api/i/arrows.png
219
209
  - doc/api/i/tree_bg.png
220
210
  - doc/api/i/results_bg.png
211
+ - doc/api/apple-touch-icon.png
221
212
  - doc/api/created.rid
213
+ - doc/api/favicon.ico
222
214
  - doc/api/index.html
223
215
  - doc/usage.erb
224
216
  - doc/history.erb