rdoc 8.0.0 → 8.1.0

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.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +1 -3
  3. data/RI.md +75 -75
  4. data/exe/rdoc +2 -2
  5. data/lib/rdoc/code_object/alias.rb +71 -69
  6. data/lib/rdoc/code_object/any_method.rb +305 -303
  7. data/lib/rdoc/code_object/attr.rb +150 -148
  8. data/lib/rdoc/code_object/class_module.rb +798 -792
  9. data/lib/rdoc/code_object/constant.rb +175 -173
  10. data/lib/rdoc/code_object/context/section.rb +142 -138
  11. data/lib/rdoc/code_object/context.rb +926 -958
  12. data/lib/rdoc/code_object/extend.rb +7 -5
  13. data/lib/rdoc/code_object/include.rb +7 -5
  14. data/lib/rdoc/code_object/method_attr.rb +326 -319
  15. data/lib/rdoc/code_object/mixin.rb +97 -95
  16. data/lib/rdoc/code_object/normal_class.rb +77 -78
  17. data/lib/rdoc/code_object/normal_module.rb +61 -59
  18. data/lib/rdoc/code_object/require.rb +23 -39
  19. data/lib/rdoc/code_object/single_class.rb +21 -19
  20. data/lib/rdoc/code_object/top_level.rb +212 -219
  21. data/lib/rdoc/code_object.rb +305 -303
  22. data/lib/rdoc/comment.rb +275 -273
  23. data/lib/rdoc/cross_reference.rb +192 -190
  24. data/lib/rdoc/encoding.rb +105 -103
  25. data/lib/rdoc/erb_partial.rb +13 -11
  26. data/lib/rdoc/erbio.rb +29 -27
  27. data/lib/rdoc/generator/aliki.rb +161 -153
  28. data/lib/rdoc/generator/darkfish.rb +645 -635
  29. data/lib/rdoc/generator/json_index.rb +233 -229
  30. data/lib/rdoc/generator/markup.rb +164 -146
  31. data/lib/rdoc/generator/pot/message_extractor.rb +57 -51
  32. data/lib/rdoc/generator/pot/po.rb +52 -51
  33. data/lib/rdoc/generator/pot/po_entry.rb +138 -132
  34. data/lib/rdoc/generator/pot.rb +85 -81
  35. data/lib/rdoc/generator/ri.rb +23 -19
  36. data/lib/rdoc/generator/template/aliki/DESIGN.md +6 -4
  37. data/lib/rdoc/generator/template/aliki/_footer.rhtml +1 -1
  38. data/lib/rdoc/generator/template/aliki/_head.rhtml +10 -10
  39. data/lib/rdoc/generator/template/aliki/_header.rhtml +29 -44
  40. data/lib/rdoc/generator/template/aliki/_sidebar_search.rhtml +4 -4
  41. data/lib/rdoc/generator/template/aliki/css/rdoc.css +207 -178
  42. data/lib/rdoc/generator/template/aliki/js/aliki.js +60 -84
  43. data/lib/rdoc/generator/template/darkfish/_footer.rhtml +1 -1
  44. data/lib/rdoc/generator.rb +48 -46
  45. data/lib/rdoc/i18n/locale.rb +99 -95
  46. data/lib/rdoc/i18n/text.rb +109 -105
  47. data/lib/rdoc/i18n.rb +7 -5
  48. data/lib/rdoc/markdown/byte_runtime.rb +80 -0
  49. data/lib/rdoc/markdown.kpeg +15 -11
  50. data/lib/rdoc/markdown.rb +40 -47
  51. data/lib/rdoc/markup/block_quote.rb +12 -8
  52. data/lib/rdoc/markup/document.rb +127 -123
  53. data/lib/rdoc/markup/formatter.rb +219 -215
  54. data/lib/rdoc/markup/include.rb +33 -29
  55. data/lib/rdoc/markup/indented_paragraph.rb +37 -33
  56. data/lib/rdoc/markup/inline_parser.rb +281 -277
  57. data/lib/rdoc/markup/list.rb +80 -88
  58. data/lib/rdoc/markup/list_item.rb +73 -85
  59. data/lib/rdoc/markup/paragraph.rb +23 -19
  60. data/lib/rdoc/markup/parser.rb +501 -497
  61. data/lib/rdoc/markup/pre_process.rb +283 -279
  62. data/lib/rdoc/markup/raw.rb +2 -2
  63. data/lib/rdoc/markup/rule.rb +16 -12
  64. data/lib/rdoc/markup/to_ansi.rb +143 -139
  65. data/lib/rdoc/markup/to_bs.rb +72 -68
  66. data/lib/rdoc/markup/to_html.rb +594 -565
  67. data/lib/rdoc/markup/to_html_crossref.rb +234 -230
  68. data/lib/rdoc/markup/to_html_snippet.rb +232 -227
  69. data/lib/rdoc/markup/to_joined_paragraph.rb +36 -32
  70. data/lib/rdoc/markup/to_label.rb +63 -59
  71. data/lib/rdoc/markup/to_markdown.rb +212 -208
  72. data/lib/rdoc/markup/to_rdoc.rb +336 -332
  73. data/lib/rdoc/markup/to_table_of_contents.rb +66 -62
  74. data/lib/rdoc/markup/to_test.rb +60 -56
  75. data/lib/rdoc/markup/to_tt_only.rb +84 -80
  76. data/lib/rdoc/markup/verbatim.rb +62 -58
  77. data/lib/rdoc/markup.rb +198 -196
  78. data/lib/rdoc/options.rb +1063 -1061
  79. data/lib/rdoc/parser/c.rb +1039 -1037
  80. data/lib/rdoc/parser/changelog.rb +319 -315
  81. data/lib/rdoc/parser/markdown.rb +17 -13
  82. data/lib/rdoc/parser/rbs.rb +239 -235
  83. data/lib/rdoc/parser/rd.rb +17 -13
  84. data/lib/rdoc/parser/ruby.rb +1245 -1124
  85. data/lib/rdoc/parser/ruby_colorizer.rb +263 -213
  86. data/lib/rdoc/parser/simple.rb +31 -27
  87. data/lib/rdoc/parser/text.rb +12 -8
  88. data/lib/rdoc/parser.rb +228 -220
  89. data/lib/rdoc/rbs_helper.rb +1 -1
  90. data/lib/rdoc/rd/inline.rb +57 -53
  91. data/lib/rdoc/rd.rb +90 -88
  92. data/lib/rdoc/rdoc.rb +500 -491
  93. data/lib/rdoc/ri/driver.rb +1140 -1135
  94. data/lib/rdoc/ri/formatter.rb +7 -3
  95. data/lib/rdoc/ri/paths.rb +140 -136
  96. data/lib/rdoc/ri/servlet.rb +354 -350
  97. data/lib/rdoc/ri/store.rb +4 -2
  98. data/lib/rdoc/ri/task.rb +55 -51
  99. data/lib/rdoc/ri.rb +14 -12
  100. data/lib/rdoc/rubygems_hook.rb +183 -181
  101. data/lib/rdoc/server.rb +349 -347
  102. data/lib/rdoc/stats/normal.rb +46 -42
  103. data/lib/rdoc/stats/quiet.rb +39 -35
  104. data/lib/rdoc/stats/verbose.rb +35 -31
  105. data/lib/rdoc/stats.rb +365 -363
  106. data/lib/rdoc/store.rb +888 -902
  107. data/lib/rdoc/task.rb +260 -256
  108. data/lib/rdoc/text.rb +135 -133
  109. data/lib/rdoc/token_stream.rb +101 -93
  110. data/lib/rdoc/tom_doc.rb +203 -201
  111. data/lib/rdoc/version.rb +1 -1
  112. metadata +4 -5
  113. data/lib/rdoc/markdown/literals.kpeg +0 -21
  114. data/lib/rdoc/markdown/literals.rb +0 -454
@@ -2,83 +2,87 @@
2
2
  require 'cgi/escape'
3
3
  require 'cgi/util' unless defined?(CGI::EscapeExt)
4
4
 
5
- ##
6
- # Creates HTML-safe labels suitable for use in id attributes. Tidylinks are
7
- # converted to their link part and cross-reference links have the suppression
8
- # marks removed (\\SomeClass is converted to SomeClass).
5
+ module RDoc
6
+ class Markup
7
+ ##
8
+ # Creates HTML-safe labels suitable for use in id attributes. Tidylinks are
9
+ # converted to their link part and cross-reference links have the suppression
10
+ # marks removed (\\SomeClass is converted to SomeClass).
9
11
 
10
- class RDoc::Markup::ToLabel < RDoc::Markup::Formatter
12
+ class ToLabel < Markup::Formatter
11
13
 
12
- attr_reader :res # :nodoc:
14
+ attr_reader :res # :nodoc:
13
15
 
14
- ##
15
- # Creates a new formatter that will output HTML-safe labels
16
+ ##
17
+ # Creates a new formatter that will output HTML-safe labels
16
18
 
17
- def initialize
18
- super
19
+ def initialize
20
+ super
19
21
 
20
- @markup.add_regexp_handling RDoc::CrossReference::CROSSREF_REGEXP, :CROSSREF
22
+ @markup.add_regexp_handling CrossReference::CROSSREF_REGEXP, :CROSSREF
21
23
 
22
- @res = []
23
- end
24
+ @res = []
25
+ end
24
26
 
25
- def handle_PLAIN_TEXT(text)
26
- @res << text
27
- end
27
+ def handle_PLAIN_TEXT(text)
28
+ @res << text
29
+ end
28
30
 
29
- def handle_REGEXP_HANDLING_TEXT(text)
30
- @res << text
31
- end
31
+ def handle_REGEXP_HANDLING_TEXT(text)
32
+ @res << text
33
+ end
32
34
 
33
- def handle_TT(text)
34
- @res << text
35
- end
35
+ def handle_TT(text)
36
+ @res << text
37
+ end
36
38
 
37
- def extract_plaintext(text)
38
- @res = []
39
- handle_inline(text)
40
- @res.join
41
- end
39
+ def extract_plaintext(text)
40
+ @res = []
41
+ handle_inline(text)
42
+ @res.join
43
+ end
42
44
 
43
- ##
44
- # Converts +text+ to an HTML-safe label using GitHub-style anchor formatting.
45
+ ##
46
+ # Converts +text+ to an HTML-safe label using GitHub-style anchor formatting.
45
47
 
46
- def convert(text)
47
- label = extract_plaintext(text)
48
+ def convert(text)
49
+ label = extract_plaintext(text)
48
50
 
49
- RDoc::Text.to_anchor(label)
50
- end
51
+ Text.to_anchor(label)
52
+ end
51
53
 
52
- ##
53
- # Converts +text+ to an HTML-safe label using legacy RDoc formatting.
54
- # Used for generating backward-compatible anchor aliases.
54
+ ##
55
+ # Converts +text+ to an HTML-safe label using legacy RDoc formatting.
56
+ # Used for generating backward-compatible anchor aliases.
55
57
 
56
- def convert_legacy(text)
57
- label = extract_plaintext(text)
58
+ def convert_legacy(text)
59
+ label = extract_plaintext(text)
58
60
 
59
- CGI.escape(label).gsub('%', '-').sub(/^-/, '')
60
- end
61
+ CGI.escape(label).gsub('%', '-').sub(/^-/, '')
62
+ end
61
63
 
62
- ##
63
- # Converts the CROSSREF +target+ to plain text, removing the suppression
64
- # marker, if any
64
+ ##
65
+ # Converts the CROSSREF +target+ to plain text, removing the suppression
66
+ # marker, if any
65
67
 
66
- def handle_regexp_CROSSREF(text)
67
- text.sub(/^\\/, '')
68
- end
68
+ def handle_regexp_CROSSREF(text)
69
+ text.sub(/^\\/, '')
70
+ end
69
71
 
70
- alias accept_blank_line ignore
71
- alias accept_block_quote ignore
72
- alias accept_heading ignore
73
- alias accept_list_end ignore
74
- alias accept_list_item_end ignore
75
- alias accept_list_item_start ignore
76
- alias accept_list_start ignore
77
- alias accept_paragraph ignore
78
- alias accept_raw ignore
79
- alias accept_rule ignore
80
- alias accept_verbatim ignore
81
- alias end_accepting ignore
82
- alias start_accepting ignore
72
+ alias accept_blank_line ignore
73
+ alias accept_block_quote ignore
74
+ alias accept_heading ignore
75
+ alias accept_list_end ignore
76
+ alias accept_list_item_end ignore
77
+ alias accept_list_item_start ignore
78
+ alias accept_list_start ignore
79
+ alias accept_paragraph ignore
80
+ alias accept_raw ignore
81
+ alias accept_rule ignore
82
+ alias accept_verbatim ignore
83
+ alias end_accepting ignore
84
+ alias start_accepting ignore
83
85
 
86
+ end
87
+ end
84
88
  end
@@ -1,215 +1,219 @@
1
1
  # frozen_string_literal: true
2
2
  # :markup: markdown
3
3
 
4
- ##
5
- # Outputs parsed markup as Markdown
4
+ module RDoc
5
+ class Markup
6
+ ##
7
+ # Outputs parsed markup as Markdown
8
+
9
+ class ToMarkdown < Markup::ToRdoc
10
+
11
+ ##
12
+ # Creates a new formatter that will output Markdown format text
13
+
14
+ def initialize
15
+ super
16
+
17
+ @headings[1] = ['# ', '']
18
+ @headings[2] = ['## ', '']
19
+ @headings[3] = ['### ', '']
20
+ @headings[4] = ['#### ', '']
21
+ @headings[5] = ['##### ', '']
22
+ @headings[6] = ['###### ', '']
23
+
24
+ add_regexp_handling_RDOCLINK
25
+
26
+ @hard_break = " \n"
27
+ end
28
+
29
+ ##
30
+ # Finishes consumption of `list`
31
+
32
+ def accept_list_end(list)
33
+ super
34
+ end
35
+
36
+ ##
37
+ # Finishes consumption of `list_item`
38
+
39
+ def accept_list_item_end(list_item)
40
+ width = case @list_type.last
41
+ when :BULLET
42
+ 4
43
+ when :NOTE, :LABEL
44
+ use_prefix
45
+
46
+ @res << "\n"
47
+
48
+ 4
49
+ else
50
+ @list_index[-1] = @list_index.last.succ
51
+ 4
52
+ end
53
+
54
+ @indent -= width
55
+ end
56
+
57
+ ##
58
+ # Prepares the visitor for consuming `list_item`
59
+
60
+ def accept_list_item_start(list_item)
61
+ type = @list_type.last
62
+
63
+ case type
64
+ when :NOTE, :LABEL
65
+ bullets = Array(list_item.label).map do |label|
66
+ attributes(label).strip
67
+ end.join "\n"
68
+
69
+ bullets << "\n" unless bullets.empty?
70
+
71
+ @prefix = ' ' * @indent
72
+ @indent += 4
73
+ @prefix << bullets << ":" << (' ' * (@indent - 1))
74
+ else
75
+ bullet = type == :BULLET ? '*' : @list_index.last.to_s + '.'
76
+ @prefix = (' ' * @indent) + bullet.ljust(4)
77
+
78
+ @indent += 4
79
+ end
80
+ end
81
+
82
+ def add_tag(tag, simple_tag, content)
83
+ if content.match?(/\A[\w\s]+\z/)
84
+ emit_inline("#{simple_tag}#{content}#{simple_tag}")
85
+ else
86
+ emit_inline("<#{tag}>#{content}</#{tag}>")
87
+ end
88
+ end
89
+
90
+ def handle_tag(nodes, simple_tag, tag)
91
+ if nodes.size == 1 && String === nodes[0]
92
+ content = apply_regexp_handling(nodes[0]).map do |text, converted|
93
+ converted ? text : convert_string(text)
94
+ end.join
95
+ add_tag(tag, simple_tag, content)
96
+ else
97
+ emit_inline("<#{tag}>")
98
+ traverse_inline_nodes(nodes)
99
+ emit_inline("</#{tag}>")
100
+ end
101
+ end
102
+
103
+ def handle_TIDYLINK(label_part, url)
104
+ if url =~ /^rdoc-label:foot/
105
+ emit_inline(handle_rdoc_link(url))
106
+ else
107
+ emit_inline('[')
108
+ traverse_inline_nodes(label_part)
109
+ emit_inline("](#{url})")
110
+ end
111
+ end
112
+
113
+ def handle_BOLD(nodes)
114
+ handle_tag(nodes, '**', 'strong')
115
+ end
116
+
117
+ def handle_EM(nodes)
118
+ handle_tag(nodes, '*', 'em')
119
+ end
120
+
121
+ def handle_BOLD_WORD(word)
122
+ add_tag('strong', '**', convert_string(word))
123
+ end
124
+
125
+ def handle_EM_WORD(word)
126
+ add_tag('em', '*', convert_string(word))
127
+ end
128
+
129
+ def handle_TT(text)
130
+ add_tag('code', '`', convert_string(text))
131
+ end
132
+
133
+ def handle_STRIKE(nodes)
134
+ handle_tag(nodes, '~~', 's')
135
+ end
136
+
137
+ def handle_HARD_BREAK
138
+ emit_inline(" \n")
139
+ end
140
+
141
+ ##
142
+ # Prepares the visitor for consuming `list`
143
+
144
+ def accept_list_start(list)
145
+ case list.type
146
+ when :BULLET, :LABEL, :NOTE
147
+ @list_index << nil
148
+ when :LALPHA, :NUMBER, :UALPHA
149
+ @list_index << 1
150
+ else
151
+ raise Error, "invalid list type #{list.type}"
152
+ end
153
+
154
+ @list_width << 4
155
+ @list_type << list.type
156
+ end
157
+
158
+ ##
159
+ # Adds `rule` to the output
160
+
161
+ def accept_rule(rule)
162
+ use_prefix or @res << ' ' * @indent
163
+ @res << '-' * 3
164
+ @res << "\n"
165
+ end
166
+
167
+ ##
168
+ # Outputs `verbatim` indented 4 columns
169
+
170
+ def accept_verbatim(verbatim)
171
+ indent = ' ' * (@indent + 4)
172
+
173
+ verbatim.parts.each do |part|
174
+ @res << indent unless part == "\n"
175
+ @res << part
176
+ end
177
+
178
+ @res << "\n"
179
+ end
180
+
181
+ ##
182
+ # Creates a Markdown-style URL from +url+ with +text+.
183
+
184
+ def gen_url(url, text)
185
+ scheme, url, = parse_url url
186
+
187
+ "[#{text.sub(%r{^#{scheme}:/*}i, '')}](#{url})"
188
+ end
189
+
190
+ ##
191
+ # Handles <tt>rdoc-</tt> type links for footnotes.
192
+
193
+ def handle_rdoc_link(url)
194
+ case url
195
+ when /^rdoc-ref:/
196
+ $'
197
+ when /^rdoc-label:footmark-(\d+)/
198
+ "[^#{$1}]:"
199
+ when /^rdoc-label:foottext-(\d+)/
200
+ "[^#{$1}]"
201
+ when /^rdoc-label:label-/
202
+ gen_url url, $'
203
+ when /^rdoc-image:/
204
+ "![](#{$'})"
205
+ when /^rdoc-[a-z]+:/
206
+ $'
207
+ end
208
+ end
209
+
210
+ ##
211
+ # Converts the rdoc-...: links into a Markdown.style links.
212
+
213
+ def handle_regexp_RDOCLINK(text)
214
+ handle_rdoc_link text
215
+ end
6
216
 
7
- class RDoc::Markup::ToMarkdown < RDoc::Markup::ToRdoc
8
-
9
- ##
10
- # Creates a new formatter that will output Markdown format text
11
-
12
- def initialize
13
- super
14
-
15
- @headings[1] = ['# ', '']
16
- @headings[2] = ['## ', '']
17
- @headings[3] = ['### ', '']
18
- @headings[4] = ['#### ', '']
19
- @headings[5] = ['##### ', '']
20
- @headings[6] = ['###### ', '']
21
-
22
- add_regexp_handling_RDOCLINK
23
-
24
- @hard_break = " \n"
25
- end
26
-
27
- ##
28
- # Finishes consumption of `list`
29
-
30
- def accept_list_end(list)
31
- super
32
- end
33
-
34
- ##
35
- # Finishes consumption of `list_item`
36
-
37
- def accept_list_item_end(list_item)
38
- width = case @list_type.last
39
- when :BULLET then
40
- 4
41
- when :NOTE, :LABEL then
42
- use_prefix
43
-
44
- @res << "\n"
45
-
46
- 4
47
- else
48
- @list_index[-1] = @list_index.last.succ
49
- 4
50
- end
51
-
52
- @indent -= width
53
- end
54
-
55
- ##
56
- # Prepares the visitor for consuming `list_item`
57
-
58
- def accept_list_item_start(list_item)
59
- type = @list_type.last
60
-
61
- case type
62
- when :NOTE, :LABEL then
63
- bullets = Array(list_item.label).map do |label|
64
- attributes(label).strip
65
- end.join "\n"
66
-
67
- bullets << "\n" unless bullets.empty?
68
-
69
- @prefix = ' ' * @indent
70
- @indent += 4
71
- @prefix << bullets << ":" << (' ' * (@indent - 1))
72
- else
73
- bullet = type == :BULLET ? '*' : @list_index.last.to_s + '.'
74
- @prefix = (' ' * @indent) + bullet.ljust(4)
75
-
76
- @indent += 4
77
- end
78
- end
79
-
80
- def add_tag(tag, simple_tag, content)
81
- if content.match?(/\A[\w\s]+\z/)
82
- emit_inline("#{simple_tag}#{content}#{simple_tag}")
83
- else
84
- emit_inline("<#{tag}>#{content}</#{tag}>")
85
- end
86
- end
87
-
88
- def handle_tag(nodes, simple_tag, tag)
89
- if nodes.size == 1 && String === nodes[0]
90
- content = apply_regexp_handling(nodes[0]).map do |text, converted|
91
- converted ? text : convert_string(text)
92
- end.join
93
- add_tag(tag, simple_tag, content)
94
- else
95
- emit_inline("<#{tag}>")
96
- traverse_inline_nodes(nodes)
97
- emit_inline("</#{tag}>")
98
- end
99
- end
100
-
101
- def handle_TIDYLINK(label_part, url)
102
- if url =~ /^rdoc-label:foot/ then
103
- emit_inline(handle_rdoc_link(url))
104
- else
105
- emit_inline('[')
106
- traverse_inline_nodes(label_part)
107
- emit_inline("](#{url})")
108
- end
109
- end
110
-
111
- def handle_BOLD(nodes)
112
- handle_tag(nodes, '**', 'strong')
113
- end
114
-
115
- def handle_EM(nodes)
116
- handle_tag(nodes, '*', 'em')
117
- end
118
-
119
- def handle_BOLD_WORD(word)
120
- add_tag('strong', '**', convert_string(word))
121
- end
122
-
123
- def handle_EM_WORD(word)
124
- add_tag('em', '*', convert_string(word))
125
- end
126
-
127
- def handle_TT(text)
128
- add_tag('code', '`', convert_string(text))
129
- end
130
-
131
- def handle_STRIKE(nodes)
132
- handle_tag(nodes, '~~', 's')
133
- end
134
-
135
- def handle_HARD_BREAK
136
- emit_inline(" \n")
137
- end
138
-
139
- ##
140
- # Prepares the visitor for consuming `list`
141
-
142
- def accept_list_start(list)
143
- case list.type
144
- when :BULLET, :LABEL, :NOTE then
145
- @list_index << nil
146
- when :LALPHA, :NUMBER, :UALPHA then
147
- @list_index << 1
148
- else
149
- raise RDoc::Error, "invalid list type #{list.type}"
150
- end
151
-
152
- @list_width << 4
153
- @list_type << list.type
154
- end
155
-
156
- ##
157
- # Adds `rule` to the output
158
-
159
- def accept_rule(rule)
160
- use_prefix or @res << ' ' * @indent
161
- @res << '-' * 3
162
- @res << "\n"
163
- end
164
-
165
- ##
166
- # Outputs `verbatim` indented 4 columns
167
-
168
- def accept_verbatim(verbatim)
169
- indent = ' ' * (@indent + 4)
170
-
171
- verbatim.parts.each do |part|
172
- @res << indent unless part == "\n"
173
- @res << part
174
217
  end
175
-
176
- @res << "\n"
177
218
  end
178
-
179
- ##
180
- # Creates a Markdown-style URL from +url+ with +text+.
181
-
182
- def gen_url(url, text)
183
- scheme, url, = parse_url url
184
-
185
- "[#{text.sub(%r{^#{scheme}:/*}i, '')}](#{url})"
186
- end
187
-
188
- ##
189
- # Handles <tt>rdoc-</tt> type links for footnotes.
190
-
191
- def handle_rdoc_link(url)
192
- case url
193
- when /^rdoc-ref:/ then
194
- $'
195
- when /^rdoc-label:footmark-(\d+)/ then
196
- "[^#{$1}]:"
197
- when /^rdoc-label:foottext-(\d+)/ then
198
- "[^#{$1}]"
199
- when /^rdoc-label:label-/ then
200
- gen_url url, $'
201
- when /^rdoc-image:/ then
202
- "![](#{$'})"
203
- when /^rdoc-[a-z]+:/ then
204
- $'
205
- end
206
- end
207
-
208
- ##
209
- # Converts the rdoc-...: links into a Markdown.style links.
210
-
211
- def handle_regexp_RDOCLINK(text)
212
- handle_rdoc_link text
213
- end
214
-
215
219
  end