rdtool 0.6.31 → 0.6.32
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING.txt +282 -617
- data/Gemfile +1 -7
- data/HISTORY +5 -1
- data/LICENSE.txt +2 -2
- data/README.html +83 -0
- data/README.ja.html +90 -0
- data/README.rd +2 -2
- data/README.rd.ja +1 -1
- data/Rakefile +145 -20
- data/bin/rd2 +1 -1
- data/doc/rd-draft.html +456 -0
- data/doc/rd-draft.ja.html +466 -0
- data/lib/rd/package.rb +2 -2
- data/lib/rd/rd2html-lib.rb +1 -1
- data/lib/rd/rd2man-lib.rb +1 -1
- data/lib/rd/rdblockparser.ry +1 -1
- data/lib/rd/rdblockparser.tab.rb +5 -5
- data/lib/rd/rdinlineparser.ry +1 -1
- data/lib/rd/rdinlineparser.tab.rb +5 -5
- data/lib/rd/tree.rb +1 -1
- data/lib/rd/version.rb +3 -1
- data/lib/rd/visitor.rb +1 -1
- data/makerdtool.rb +3 -3
- data/rdtool.gemspec +112 -125
- data/setup.rb +6 -6
- data/utils/rd-mode.el +41 -0
- metadata +55 -27
- data/MANIFEST +0 -89
- data/VERSION +0 -1
- data/test.rb +0 -33
data/utils/rd-mode.el
CHANGED
@@ -66,6 +66,7 @@
|
|
66
66
|
(rd-hide-other-block-all)
|
67
67
|
(rd-setup-keys)
|
68
68
|
(setq indent-tabs-mode nil)
|
69
|
+
(setq imenu-create-index-function 'rd-imenu-create-index)
|
69
70
|
(run-hooks 'rd-mode-hook)
|
70
71
|
)
|
71
72
|
|
@@ -420,6 +421,46 @@
|
|
420
421
|
)
|
421
422
|
)
|
422
423
|
|
424
|
+
(defun rd-imenu-create-index ()
|
425
|
+
(let ((root '(nil . nil))
|
426
|
+
cur-alist
|
427
|
+
(cur-level 0)
|
428
|
+
(pattern "^\\(=+\\)[ \t\v\f]*\\(.*?\\)[ \t\v\f]*$")
|
429
|
+
(empty-heading "-")
|
430
|
+
(self-heading ".")
|
431
|
+
pos level heading alist)
|
432
|
+
(save-excursion
|
433
|
+
(goto-char (point-min))
|
434
|
+
(while (re-search-forward pattern (point-max) t)
|
435
|
+
(setq heading (match-string-no-properties 2)
|
436
|
+
level (min 6 (length (match-string-no-properties 1)))
|
437
|
+
pos (match-beginning 1))
|
438
|
+
(if (= (length heading) 0)
|
439
|
+
(setq heading empty-heading))
|
440
|
+
(setq alist (list (cons heading pos)))
|
441
|
+
(cond
|
442
|
+
((= cur-level level) ; new sibling
|
443
|
+
(setcdr cur-alist alist)
|
444
|
+
(setq cur-alist alist))
|
445
|
+
((< cur-level level) ; first child
|
446
|
+
(dotimes (i (- level cur-level 1))
|
447
|
+
(setq alist (list (cons empty-heading alist))))
|
448
|
+
(if cur-alist
|
449
|
+
(let* ((parent (car cur-alist))
|
450
|
+
(self-pos (cdr parent)))
|
451
|
+
(setcdr parent (cons (cons self-heading self-pos) alist)))
|
452
|
+
(setcdr root alist)) ; primogenitor
|
453
|
+
(setq cur-alist alist
|
454
|
+
cur-level level))
|
455
|
+
(t ; new sibling of an ancestor
|
456
|
+
(let ((sibling-alist (last (cdr root))))
|
457
|
+
(dotimes (i (1- level))
|
458
|
+
(setq sibling-alist (last (cdar sibling-alist))))
|
459
|
+
(setcdr sibling-alist alist)
|
460
|
+
(setq cur-alist alist
|
461
|
+
cur-level level))))))
|
462
|
+
(cdr root)))
|
463
|
+
|
423
464
|
(provide 'rd-mode)
|
424
465
|
;;; rd-mode.el ends here
|
425
466
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdtool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.32
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,41 +9,30 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-02-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
requirement: &
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :development
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: *19834960
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: jeweler
|
27
|
-
requirement: &19834200 !ruby/object:Gem::Requirement
|
15
|
+
name: racc
|
16
|
+
requirement: &14105100 !ruby/object:Gem::Requirement
|
28
17
|
none: false
|
29
18
|
requirements:
|
30
19
|
- - ~>
|
31
20
|
- !ruby/object:Gem::Version
|
32
|
-
version: 1.6
|
21
|
+
version: 1.4.6
|
33
22
|
type: :development
|
34
23
|
prerelease: false
|
35
|
-
version_requirements: *
|
24
|
+
version_requirements: *14105100
|
36
25
|
- !ruby/object:Gem::Dependency
|
37
|
-
name:
|
38
|
-
requirement: &
|
26
|
+
name: rake
|
27
|
+
requirement: &14103860 !ruby/object:Gem::Requirement
|
39
28
|
none: false
|
40
29
|
requirements:
|
41
|
-
- -
|
30
|
+
- - ! '>='
|
42
31
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
32
|
+
version: '0'
|
44
33
|
type: :development
|
45
34
|
prerelease: false
|
46
|
-
version_requirements: *
|
35
|
+
version_requirements: *14103860
|
47
36
|
description: RD is multipurpose documentation format created for documentating Ruby
|
48
37
|
and output of Ruby world. You can embed RD into Ruby script. And RD have neat syntax
|
49
38
|
which help you to read document in Ruby script. On the other hand, RD have a feature
|
@@ -59,14 +48,16 @@ files:
|
|
59
48
|
- Gemfile
|
60
49
|
- HISTORY
|
61
50
|
- LICENSE.txt
|
62
|
-
-
|
51
|
+
- README.html
|
52
|
+
- README.ja.html
|
63
53
|
- README.rd
|
64
54
|
- README.rd.ja
|
65
55
|
- Rakefile
|
66
56
|
- TODO
|
67
|
-
- VERSION
|
68
57
|
- bin/rd2
|
69
58
|
- bin/rdswap.rb
|
59
|
+
- doc/rd-draft.html
|
60
|
+
- doc/rd-draft.ja.html
|
70
61
|
- doc/rd-draft.rd
|
71
62
|
- doc/rd-draft.rd.ja
|
72
63
|
- lib/rd/block-element.rb
|
@@ -107,7 +98,6 @@ files:
|
|
107
98
|
- makerdtool.rb
|
108
99
|
- rdtool.gemspec
|
109
100
|
- setup.rb
|
110
|
-
- test.rb
|
111
101
|
- test/data/includee1.html
|
112
102
|
- test/data/includee2.html
|
113
103
|
- test/data/includee3.nothtml
|
@@ -149,7 +139,7 @@ files:
|
|
149
139
|
- utils/rd-mode.el
|
150
140
|
homepage: http://github.com/uwabami/rdtool
|
151
141
|
licenses:
|
152
|
-
- GPL
|
142
|
+
- GPL-2+
|
153
143
|
- Ruby
|
154
144
|
post_install_message:
|
155
145
|
rdoc_options: []
|
@@ -173,4 +163,42 @@ rubygems_version: 1.8.11
|
|
173
163
|
signing_key:
|
174
164
|
specification_version: 3
|
175
165
|
summary: RDtool is formatter for RD.
|
176
|
-
test_files:
|
166
|
+
test_files:
|
167
|
+
- test/data/includee1.html
|
168
|
+
- test/data/includee2.html
|
169
|
+
- test/data/includee3.nothtml
|
170
|
+
- test/data/includee4.xhtml
|
171
|
+
- test/data/label.rbl
|
172
|
+
- test/data/label2.rbl
|
173
|
+
- test/data/sub/includee2.html
|
174
|
+
- test/data/sub/includee4.html
|
175
|
+
- test/dummy-observer.rb
|
176
|
+
- test/dummy.rb
|
177
|
+
- test/temp-dir.rb
|
178
|
+
- test/test-block-parser.rb
|
179
|
+
- test/test-desclist-item.rb
|
180
|
+
- test/test-document-element.rb
|
181
|
+
- test/test-document-struct.rb
|
182
|
+
- test/test-element.rb
|
183
|
+
- test/test-headline.rb
|
184
|
+
- test/test-inline-parser.rb
|
185
|
+
- test/test-list-item.rb
|
186
|
+
- test/test-list.rb
|
187
|
+
- test/test-methodlist-item.rb
|
188
|
+
- test/test-nonterminal-element.rb
|
189
|
+
- test/test-nonterminal-inline.rb
|
190
|
+
- test/test-output-format-visitor.rb
|
191
|
+
- test/test-parser-util.rb
|
192
|
+
- test/test-rbl-file.rb
|
193
|
+
- test/test-rbl-suite.rb
|
194
|
+
- test/test-rd2html-lib.rb
|
195
|
+
- test/test-rdtree.rb
|
196
|
+
- test/test-rdvisitor.rb
|
197
|
+
- test/test-reference-resolver.rb
|
198
|
+
- test/test-reference.rb
|
199
|
+
- test/test-search-file.rb
|
200
|
+
- test/test-terminal-inline.rb
|
201
|
+
- test/test-textblock.rb
|
202
|
+
- test/test-tree.rb
|
203
|
+
- test/test-version.rb
|
204
|
+
- test/test-visitor.rb
|
data/MANIFEST
DELETED
@@ -1,89 +0,0 @@
|
|
1
|
-
HISTORY
|
2
|
-
MANIFEST
|
3
|
-
README.html
|
4
|
-
README.ja.html
|
5
|
-
README.rd
|
6
|
-
README.rd.ja
|
7
|
-
bin/rd2
|
8
|
-
bin/rdswap.rb
|
9
|
-
doc/rd-draft.html
|
10
|
-
doc/rd-draft.ja.html
|
11
|
-
doc/rd-draft.rd
|
12
|
-
doc/rd-draft.rd.ja
|
13
|
-
lib/rd/block-element.rb
|
14
|
-
lib/rd/complex-list-item.rb
|
15
|
-
lib/rd/desclist.rb
|
16
|
-
lib/rd/document-struct.rb
|
17
|
-
lib/rd/dot.rd2rc
|
18
|
-
lib/rd/element.rb
|
19
|
-
lib/rd/filter.rb
|
20
|
-
lib/rd/inline-element.rb
|
21
|
-
lib/rd/labeled-element.rb
|
22
|
-
lib/rd/list.rb
|
23
|
-
lib/rd/loose-struct.rb
|
24
|
-
lib/rd/methodlist.rb
|
25
|
-
lib/rd/output-format-visitor.rb
|
26
|
-
lib/rd/package.rb
|
27
|
-
lib/rd/parser-util.rb
|
28
|
-
lib/rd/post-install
|
29
|
-
lib/rd/rbl-file.rb
|
30
|
-
lib/rd/rbl-suite.rb
|
31
|
-
lib/rd/rd-struct.rb
|
32
|
-
lib/rd/rd2html-lib.rb
|
33
|
-
lib/rd/rd2html-opt.rb
|
34
|
-
lib/rd/rd2man-lib.rb
|
35
|
-
lib/rd/rd2rdo-lib.rb
|
36
|
-
lib/rd/rd2rmi-lib.rb
|
37
|
-
lib/rd/rdblockparser.ry
|
38
|
-
lib/rd/rdblockparser.tab.rb
|
39
|
-
lib/rd/rdfmt.rb
|
40
|
-
lib/rd/rdinlineparser.ry
|
41
|
-
lib/rd/rdinlineparser.tab.rb
|
42
|
-
lib/rd/rdvisitor.rb
|
43
|
-
lib/rd/reference-resolver.rb
|
44
|
-
lib/rd/search-file.rb
|
45
|
-
lib/rd/tree.rb
|
46
|
-
lib/rd/version.rb
|
47
|
-
lib/rd/visitor.rb
|
48
|
-
makerdtool.rb
|
49
|
-
setup.rb
|
50
|
-
test.rb
|
51
|
-
test/data/includee1.html
|
52
|
-
test/data/includee2.html
|
53
|
-
test/data/includee3.nothtml
|
54
|
-
test/data/includee4.xhtml
|
55
|
-
test/data/label.rbl
|
56
|
-
test/data/label2.rbl
|
57
|
-
test/data/sub/includee2.html
|
58
|
-
test/data/sub/includee4.html
|
59
|
-
test/dummy-observer.rb
|
60
|
-
test/dummy.rb
|
61
|
-
test/temp-dir.rb
|
62
|
-
test/test-block-parser.rb
|
63
|
-
test/test-desclist-item.rb
|
64
|
-
test/test-document-element.rb
|
65
|
-
test/test-document-struct.rb
|
66
|
-
test/test-element.rb
|
67
|
-
test/test-headline.rb
|
68
|
-
test/test-inline-parser.rb
|
69
|
-
test/test-list-item.rb
|
70
|
-
test/test-list.rb
|
71
|
-
test/test-methodlist-item.rb
|
72
|
-
test/test-nonterminal-element.rb
|
73
|
-
test/test-nonterminal-inline.rb
|
74
|
-
test/test-output-format-visitor.rb
|
75
|
-
test/test-parser-util.rb
|
76
|
-
test/test-rbl-file.rb
|
77
|
-
test/test-rbl-suite.rb
|
78
|
-
test/test-rd2html-lib.rb
|
79
|
-
test/test-rdtree.rb
|
80
|
-
test/test-rdvisitor.rb
|
81
|
-
test/test-reference-resolver.rb
|
82
|
-
test/test-reference.rb
|
83
|
-
test/test-search-file.rb
|
84
|
-
test/test-terminal-inline.rb
|
85
|
-
test/test-textblock.rb
|
86
|
-
test/test-tree.rb
|
87
|
-
test/test-version.rb
|
88
|
-
test/test-visitor.rb
|
89
|
-
utils/rd-mode.el
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.6.31
|
data/test.rb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
$VERBOSE = true
|
4
|
-
|
5
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "test"))
|
6
|
-
|
7
|
-
load 'test/test-block-parser.rb'
|
8
|
-
load 'test/test-desclist-item.rb'
|
9
|
-
load 'test/test-document-element.rb'
|
10
|
-
load 'test/test-document-struct.rb'
|
11
|
-
load 'test/test-element.rb'
|
12
|
-
load 'test/test-headline.rb'
|
13
|
-
load 'test/test-inline-parser.rb'
|
14
|
-
load 'test/test-list-item.rb'
|
15
|
-
load 'test/test-list.rb'
|
16
|
-
load 'test/test-methodlist-item.rb'
|
17
|
-
load 'test/test-nonterminal-element.rb'
|
18
|
-
load 'test/test-nonterminal-inline.rb'
|
19
|
-
load 'test/test-output-format-visitor.rb'
|
20
|
-
load 'test/test-parser-util.rb'
|
21
|
-
load 'test/test-rbl-file.rb'
|
22
|
-
load 'test/test-rbl-suite.rb'
|
23
|
-
load 'test/test-rd2html-lib.rb'
|
24
|
-
load 'test/test-rdtree.rb'
|
25
|
-
load 'test/test-rdvisitor.rb'
|
26
|
-
load 'test/test-reference-resolver.rb'
|
27
|
-
load 'test/test-reference.rb'
|
28
|
-
load 'test/test-search-file.rb'
|
29
|
-
load 'test/test-terminal-inline.rb'
|
30
|
-
load 'test/test-textblock.rb'
|
31
|
-
load 'test/test-tree.rb'
|
32
|
-
load 'test/test-version.rb'
|
33
|
-
load 'test/test-visitor.rb'
|