rdtool 0.6.36 → 0.6.37
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.
- data/HISTORY +2 -0
- data/README.html +1 -1
- data/README.ja.html +1 -1
- data/README.rd +1 -1
- data/README.rd.ja +1 -1
- data/lib/rd/rd2man-lib.rb +11 -1
- data/lib/rd/version.rb +1 -1
- data/rdtool.gemspec +1 -1
- metadata +1 -1
data/HISTORY
CHANGED
data/README.html
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
<title>Untitled</title>
|
8
8
|
</head>
|
9
9
|
<body>
|
10
|
-
<h1><a name="label-0" id="label-0">RDtool 0.6.
|
10
|
+
<h1><a name="label-0" id="label-0">RDtool 0.6.37</a></h1><!-- RDLabel: "RDtool 0.6.37" -->
|
11
11
|
<h2><a name="label-1" id="label-1">What is RDtool</a></h2><!-- RDLabel: "What is RDtool" -->
|
12
12
|
<p>RD is Ruby's POD. RDtool is formatter for RD.</p>
|
13
13
|
<h2><a name="label-2" id="label-2">What is Changed</a></h2><!-- RDLabel: "What is Changed" -->
|
data/README.ja.html
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
<title>Untitled</title>
|
8
8
|
</head>
|
9
9
|
<body>
|
10
|
-
<h1><a name="label-0" id="label-0">RDtool 0.6.
|
10
|
+
<h1><a name="label-0" id="label-0">RDtool 0.6.37</a></h1><!-- RDLabel: "RDtool 0.6.37" -->
|
11
11
|
<h2><a name="label-1" id="label-1">RDってなに?</a></h2><!-- RDLabel: "RDってなに?" -->
|
12
12
|
<p>RDはRubyにおけるPOD(Plain Old Documentation)のようなものです。
|
13
13
|
RDtoolはRDのフォーマッタであり、RDをHTMLなどに変換できます。</p>
|
data/README.rd
CHANGED
data/README.rd.ja
CHANGED
data/lib/rd/rd2man-lib.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
=end
|
4
4
|
|
5
5
|
require "rd/rdvisitor"
|
6
|
+
require "rd/version"
|
6
7
|
|
7
8
|
unless [].respond_to? :collect!
|
8
9
|
class Array
|
@@ -30,6 +31,7 @@ module RD
|
|
30
31
|
def initialize
|
31
32
|
@enumcounter = 0
|
32
33
|
@index = {}
|
34
|
+
@filename = nil
|
33
35
|
end
|
34
36
|
|
35
37
|
def visit(tree)
|
@@ -39,7 +41,7 @@ module RD
|
|
39
41
|
|
40
42
|
def apply_to_DocumentElement(element, content)
|
41
43
|
content = content.join
|
42
|
-
title =
|
44
|
+
title = guess_title
|
43
45
|
title = title.sub(/\.rd$/i, '').upcase
|
44
46
|
<<"EOT"
|
45
47
|
.\\" DO NOT MODIFY THIS FILE! it was generated by rd2
|
@@ -227,6 +229,14 @@ EOT
|
|
227
229
|
end
|
228
230
|
private :meta_char_escape
|
229
231
|
|
232
|
+
def guess_title
|
233
|
+
return ARGF.filename unless ARGF.filename == "-"
|
234
|
+
return @filename if @filename
|
235
|
+
"Untitled"
|
236
|
+
end
|
237
|
+
private :guess_title
|
238
|
+
|
239
|
+
|
230
240
|
end # RD2MANVisitor
|
231
241
|
end # RD
|
232
242
|
|
data/lib/rd/version.rb
CHANGED
data/rdtool.gemspec
CHANGED