erbook 7.1.1 → 7.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/HelloWorld.input +12 -19
- data/doc/HelloWorld.spec +1 -0
- data/doc/api/apple-touch-icon.png +0 -0
- data/doc/api/classes/ERBook/Document/Node.html +6 -6
- data/doc/api/classes/ERBook/Document.html +24 -24
- data/doc/api/classes/ERBook/Template/Sandbox.html +5 -5
- data/doc/api/classes/ERBook/Template.html +20 -20
- data/doc/api/classes/RDoc/AnyMethod.html +24 -24
- data/doc/api/classes/RDoc/TopLevel.html +36 -36
- data/doc/api/classes/String.html +17 -12
- data/doc/api/created.rid +1 -1
- data/doc/api/favicon.ico +0 -0
- data/doc/api/files/CREDITS.html +1 -1
- data/doc/api/files/LICENSE.html +1 -1
- data/doc/api/files/lib/erbook/document_rb.html +3 -1
- data/doc/api/files/lib/erbook/rdoc_rb.html +4 -2
- data/doc/api/files/lib/erbook/template_rb.html +1 -1
- data/doc/api/files/lib/erbook/to_xhtml_rb.html +3 -3
- data/doc/api/files/lib/erbook_rb.html +1 -3
- data/doc/api/js/searchdoc.js +38 -15
- data/doc/api/panel/index.html +13 -5
- data/doc/api/panel/search_index.js +1 -1
- data/doc/formats.erb +18 -18
- data/doc/history.erb +66 -1
- data/doc/index.html +1282 -1023
- data/doc/theory.erb +2 -0
- data/fmt/xhtml.yaml +356 -285
- data/lib/erbook/document.rb +11 -11
- data/lib/erbook/rdoc.rb +9 -4
- data/lib/erbook/to_xhtml.rb +5 -0
- data/lib/erbook.rb +2 -3
- metadata +13 -21
data/lib/erbook/document.rb
CHANGED
@@ -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
|
85
|
-
:defn
|
86
|
-
:args
|
87
|
-
:
|
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
|
-
@
|
100
|
-
node.number = (@
|
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
|
-
|
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/
|
152
|
-
include
|
153
|
-
|
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
|
data/lib/erbook/to_xhtml.rb
CHANGED
@@ -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.
|
13
|
-
:release => '2009-09
|
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.
|
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
|
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:
|
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:
|
43
|
+
version: "0.8"
|
44
44
|
version:
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
|
-
name:
|
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:
|
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:
|
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: "
|
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.
|
96
|
-
Version 7.
|
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/#
|
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
|