rdoc 6.1.2.1 → 6.3.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rdoc might be problematic. Click here for more details.

Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -0
  3. data/README.rdoc +0 -1
  4. data/Rakefile +28 -18
  5. data/lib/rdoc/any_method.rb +52 -7
  6. data/lib/rdoc/class_module.rb +1 -1
  7. data/lib/rdoc/comment.rb +12 -1
  8. data/lib/rdoc/context/section.rb +0 -13
  9. data/lib/rdoc/context.rb +10 -2
  10. data/lib/rdoc/cross_reference.rb +4 -4
  11. data/lib/rdoc/erb_partial.rb +1 -1
  12. data/lib/rdoc/erbio.rb +2 -2
  13. data/lib/rdoc/generator/darkfish.rb +9 -9
  14. data/lib/rdoc/generator/pot.rb +3 -3
  15. data/lib/rdoc/generator/template/darkfish/_head.rhtml +4 -5
  16. data/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml +2 -2
  17. data/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +2 -2
  18. data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +7 -7
  19. data/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml +2 -2
  20. data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +7 -7
  21. data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +6 -6
  22. data/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +5 -5
  23. data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +5 -5
  24. data/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +5 -5
  25. data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +4 -4
  26. data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +4 -4
  27. data/lib/rdoc/generator/template/darkfish/class.rhtml +44 -44
  28. data/lib/rdoc/generator/template/darkfish/css/rdoc.css +33 -5
  29. data/lib/rdoc/generator/template/darkfish/index.rhtml +3 -4
  30. data/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +15 -16
  31. data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +16 -16
  32. data/lib/rdoc/i18n.rb +1 -1
  33. data/lib/rdoc/markdown/literals.rb +7 -8
  34. data/lib/rdoc/markdown.kpeg +20 -2
  35. data/lib/rdoc/markdown.rb +458 -61
  36. data/lib/rdoc/markup/attr_span.rb +8 -2
  37. data/lib/rdoc/markup/attribute_manager.rb +93 -28
  38. data/lib/rdoc/markup/formatter.rb +1 -1
  39. data/lib/rdoc/markup/parser.rb +58 -42
  40. data/lib/rdoc/markup/pre_process.rb +1 -1
  41. data/lib/rdoc/markup/table.rb +47 -0
  42. data/lib/rdoc/markup/to_html.rb +46 -6
  43. data/lib/rdoc/markup/to_html_crossref.rb +18 -6
  44. data/lib/rdoc/markup/to_joined_paragraph.rb +1 -0
  45. data/lib/rdoc/markup/to_rdoc.rb +28 -0
  46. data/lib/rdoc/markup/to_table_of_contents.rb +1 -0
  47. data/lib/rdoc/markup.rb +1 -2
  48. data/lib/rdoc/options.rb +56 -6
  49. data/lib/rdoc/parser/c.rb +139 -183
  50. data/lib/rdoc/parser/changelog.rb +145 -14
  51. data/lib/rdoc/parser/ripper_state_lex.rb +2 -1
  52. data/lib/rdoc/parser/ruby.rb +18 -8
  53. data/lib/rdoc/parser.rb +7 -7
  54. data/lib/rdoc/rdoc.rb +34 -21
  55. data/lib/rdoc/ri/driver.rb +9 -5
  56. data/lib/rdoc/ri/paths.rb +3 -17
  57. data/lib/rdoc/ri/task.rb +1 -1
  58. data/lib/rdoc/rubygems_hook.rb +2 -2
  59. data/lib/rdoc/servlet.rb +16 -8
  60. data/lib/rdoc/store.rb +6 -14
  61. data/lib/rdoc/task.rb +1 -1
  62. data/lib/rdoc/text.rb +8 -2
  63. data/lib/rdoc/token_stream.rb +8 -3
  64. data/lib/rdoc/tom_doc.rb +6 -7
  65. data/lib/rdoc/version.rb +1 -1
  66. data/lib/rdoc.rb +21 -0
  67. data/man/ri.1 +247 -0
  68. data/rdoc.gemspec +196 -9
  69. metadata +7 -67
  70. data/.document +0 -5
  71. data/.gitignore +0 -14
  72. data/.travis.yml +0 -21
  73. data/appveyor.yml +0 -36
  74. data/lib/rdoc/markup/formatter_test_case.rb +0 -764
  75. data/lib/rdoc/markup/text_formatter_test_case.rb +0 -115
@@ -25,9 +25,9 @@
25
25
  <%= klass.description %>
26
26
  </section>
27
27
 
28
- <% klass.each_section do |section, constants, attributes| %>
28
+ <%- klass.each_section do |section, constants, attributes| -%>
29
29
  <section id="<%= section.aref %>" class="documentation-section">
30
- <% if section.title then %>
30
+ <%- if section.title then -%>
31
31
  <header class="documentation-section-title">
32
32
  <h2>
33
33
  <%= section.title %>
@@ -36,39 +36,39 @@
36
36
  <a href="#top">&uarr; top</a>
37
37
  </span>
38
38
  </header>
39
- <% end %>
39
+ <%- end -%>
40
40
 
41
- <% if section.comment then %>
41
+ <%- if section.comment then -%>
42
42
  <div>
43
43
  <%= section.description %>
44
44
  </div>
45
- <% end %>
45
+ <%- end -%>
46
46
 
47
- <% unless constants.empty? then %>
47
+ <%- unless constants.empty? then -%>
48
48
  <section class="constants-list">
49
49
  <header>
50
50
  <h3>Constants</h3>
51
51
  </header>
52
52
  <dl>
53
- <% constants.each do |const| %>
53
+ <%- constants.each do |const| -%>
54
54
  <dt id="<%= const.name %>"><%= const.name %>
55
- <% if const.comment then %>
55
+ <%- if const.comment then -%>
56
56
  <dd><%= const.description.strip %>
57
- <% else %>
57
+ <%- else -%>
58
58
  <dd class="missing-docs">(Not documented)
59
- <% end %>
60
- <% end %>
59
+ <%- end -%>
60
+ <%- end -%>
61
61
  </dl>
62
62
  </section>
63
- <% end %>
63
+ <%- end -%>
64
64
 
65
- <% unless attributes.empty? then %>
65
+ <%- unless attributes.empty? then -%>
66
66
  <section class="attribute-method-details" class="method-section">
67
67
  <header>
68
68
  <h3>Attributes</h3>
69
69
  </header>
70
70
 
71
- <% attributes.each do |attrib| %>
71
+ <%- attributes.each do |attrib| -%>
72
72
  <div id="<%= attrib.aref %>" class="method-detail">
73
73
  <div class="method-heading attribute-method-heading">
74
74
  <span class="method-name"><%= h attrib.name %></span><span
@@ -76,18 +76,18 @@
76
76
  </div>
77
77
 
78
78
  <div class="method-description">
79
- <% if attrib.comment then %>
79
+ <%- if attrib.comment then -%>
80
80
  <%= attrib.description.strip %>
81
- <% else %>
81
+ <%- else -%>
82
82
  <p class="missing-docs">(Not documented)
83
- <% end %>
83
+ <%- end -%>
84
84
  </div>
85
85
  </div>
86
- <% end %>
86
+ <%- end -%>
87
87
  </section>
88
- <% end %>
88
+ <%- end -%>
89
89
 
90
- <% klass.methods_by_type(section).each do |type, visibilities|
90
+ <%- klass.methods_by_type(section).each do |type, visibilities|
91
91
  next if visibilities.empty?
92
92
  visibilities.each do |visibility, methods|
93
93
  next if methods.empty? %>
@@ -96,38 +96,38 @@
96
96
  <h3><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h3>
97
97
  </header>
98
98
 
99
- <% methods.each do |method| %>
99
+ <%- methods.each do |method| -%>
100
100
  <div id="<%= method.aref %>" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>">
101
- <% if method.call_seq then %>
102
- <% method.call_seq.strip.split("\n").each_with_index do |call_seq, i| %>
101
+ <%- if (call_seq = method.call_seq) then -%>
102
+ <%- call_seq.strip.split("\n").each_with_index do |call_seq, i| -%>
103
103
  <div class="method-heading">
104
104
  <span class="method-callseq">
105
105
  <%= h(call_seq.strip.
106
106
  gsub( /^\w+\./m, '')).
107
107
  gsub(/(.*)[-=]&gt;/, '\1&rarr;') %>
108
108
  </span>
109
- <% if i == 0 and method.token_stream then %>
109
+ <%- if i == 0 and method.token_stream then -%>
110
110
  <span class="method-click-advice">click to toggle source</span>
111
- <% end %>
111
+ <%- end -%>
112
112
  </div>
113
- <% end %>
114
- <% else %>
113
+ <%- end -%>
114
+ <%- else -%>
115
115
  <div class="method-heading">
116
116
  <span class="method-name"><%= h method.name %></span><span
117
117
  class="method-args"><%= h method.param_seq %></span>
118
- <% if method.token_stream then %>
118
+ <%- if method.token_stream then -%>
119
119
  <span class="method-click-advice">click to toggle source</span>
120
- <% end %>
120
+ <%- end -%>
121
121
  </div>
122
- <% end %>
122
+ <%- end -%>
123
123
 
124
124
  <div class="method-description">
125
- <% if method.comment then %>
125
+ <%- if method.comment then -%>
126
126
  <%= method.description.strip %>
127
- <% else %>
127
+ <%- else -%>
128
128
  <p class="missing-docs">(Not documented)
129
- <% end %>
130
- <% if method.calls_super then %>
129
+ <%- end -%>
130
+ <%- if method.calls_super then -%>
131
131
  <div class="method-calls-super">
132
132
  Calls superclass method
133
133
  <%=
@@ -135,16 +135,16 @@
135
135
  method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil
136
136
  %>
137
137
  </div>
138
- <% end %>
138
+ <%- end -%>
139
139
 
140
- <% if method.token_stream then %>
140
+ <%- if method.token_stream then -%>
141
141
  <div class="method-source-code" id="<%= method.html_name %>-source">
142
142
  <pre><%= method.markup_code %></pre>
143
143
  </div>
144
- <% end %>
144
+ <%- end -%>
145
145
  </div>
146
146
 
147
- <% unless method.aliases.empty? then %>
147
+ <%- unless method.aliases.empty? then -%>
148
148
  <div class="aliases">
149
149
  Also aliased as: <%= method.aliases.map do |aka|
150
150
  if aka.parent then # HACK lib/rexml/encodings
@@ -154,19 +154,19 @@
154
154
  end
155
155
  end.join ", " %>
156
156
  </div>
157
- <% end %>
157
+ <%- end -%>
158
158
 
159
- <% if method.is_alias_for then %>
159
+ <%- if method.is_alias_for then -%>
160
160
  <div class="aliases">
161
161
  Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a>
162
162
  </div>
163
- <% end %>
163
+ <%- end -%>
164
164
  </div>
165
165
 
166
- <% end %>
166
+ <%- end -%>
167
167
  </section>
168
- <% end
168
+ <%- end
169
169
  end %>
170
170
  </section>
171
- <% end %>
171
+ <%- end -%>
172
172
  </main>
@@ -74,6 +74,28 @@ h6:target {
74
74
  code,
75
75
  pre {
76
76
  font-family: "Source Code Pro", Monaco, monospace;
77
+ background-color: rgba(27,31,35,0.05);
78
+ padding: 0em 0.2em;
79
+ border-radius: 0.2em;
80
+ }
81
+
82
+ table {
83
+ margin: 0;
84
+ border-spacing: 0;
85
+ border-collapse: collapse;
86
+ }
87
+
88
+ table tr th, table tr td {
89
+ padding: 0.2em 0.4em;
90
+ border: 1px solid #ccc;
91
+ }
92
+
93
+ table tr th {
94
+ background-color: #eceaed;
95
+ }
96
+
97
+ table tr:nth-child(even) td {
98
+ background-color: #f5f4f6;
77
99
  }
78
100
 
79
101
  /* @group Generic Classes */
@@ -103,7 +125,7 @@ pre {
103
125
 
104
126
  .missing-docs {
105
127
  font-size: 120%;
106
- background: white url(images/wrench_orange.png) no-repeat 4px center;
128
+ background: white url(../images/wrench_orange.png) no-repeat 4px center;
107
129
  color: #ccc;
108
130
  line-height: 2em;
109
131
  border: 1px solid #d00;
@@ -147,11 +169,11 @@ pre {
147
169
  .table-of-contents li .toc-toggle {
148
170
  width: 16px;
149
171
  height: 16px;
150
- background: url(images/add.png) no-repeat;
172
+ background: url(../images/add.png) no-repeat;
151
173
  }
152
174
 
153
175
  .table-of-contents li .toc-toggle.open {
154
- background: url(images/delete.png) no-repeat;
176
+ background: url(../images/delete.png) no-repeat;
155
177
  }
156
178
 
157
179
  /* @end */
@@ -163,6 +185,7 @@ nav {
163
185
  width: 260px;
164
186
  font-family: Helvetica, sans-serif;
165
187
  font-size: 14px;
188
+ border-right: 1px solid #ccc;
166
189
  }
167
190
 
168
191
  main {
@@ -273,8 +296,13 @@ ul.link-list .type {
273
296
  -webkit-border-radius: 5px;
274
297
  }
275
298
 
299
+ dl.note-list dt {
300
+ float: left;
301
+ margin-right: 1em;
302
+ }
303
+
276
304
  .calls-super {
277
- background: url(images/arrow_up.png) no-repeat right center;
305
+ background: url(../images/arrow_up.png) no-repeat right center;
278
306
  }
279
307
 
280
308
  /* @end */
@@ -500,7 +528,7 @@ main .method-click-advice {
500
528
  visibility: hidden;
501
529
  padding-right: 20px;
502
530
  line-height: 20px;
503
- background: url(images/zoom.png) no-repeat right top;
531
+ background: url(../images/zoom.png) no-repeat right top;
504
532
  }
505
533
  main .method-heading:hover .method-click-advice {
506
534
  visibility: visible;
@@ -13,11 +13,10 @@
13
13
  </nav>
14
14
 
15
15
  <main role="main">
16
- <% if @options.main_page and
16
+ <%- if @options.main_page and
17
17
  main_page = @files.find { |f| f.full_name == @options.main_page } then %>
18
18
  <%= main_page.description %>
19
- <% else %>
19
+ <%- else -%>
20
20
  <p>This is the API documentation for <%= @title %>.
21
- <% end %>
21
+ <%- end -%>
22
22
  </main>
23
-
@@ -19,28 +19,28 @@
19
19
  <p>Here you can browse local documentation from the ruby standard library and
20
20
  your installed gems.
21
21
 
22
- <% extra_dirs = installed.select { |_, _, _, type,| type == :extra } %>
23
- <% unless extra_dirs.empty? %>
22
+ <%- extra_dirs = installed.select { |_, _, _, type,| type == :extra } -%>
23
+ <%- unless extra_dirs.empty? -%>
24
24
  <h2>Extra Documentation Directories</h2>
25
25
 
26
26
  <p>The following additional documentation directories are available:</p>
27
27
 
28
28
  <ol>
29
- <% extra_dirs.each do |name, href, exists, _, path| %>
29
+ <%- extra_dirs.each do |name, href, exists, _, path| -%>
30
30
  <li>
31
- <% if exists %>
31
+ <%- if exists -%>
32
32
  <a href="<%= href %>"><%= h name %></a> (<%= h path %>)
33
- <% else %>
33
+ <%- else -%>
34
34
  <%= h name %> (<%= h path %>; <i>not available</i>)
35
- <% end %>
35
+ <%- end -%>
36
36
  </li>
37
- <% end %>
37
+ <%- end -%>
38
38
  </ol>
39
- <% end %>
39
+ <%- end -%>
40
40
 
41
- <% gems = installed.select { |_, _, _, type,| type == :gem } %>
42
- <% missing = gems.reject { |_, _, exists,| exists } %>
43
- <% unless missing.empty? then %>
41
+ <%- gems = installed.select { |_, _, _, type,| type == :gem } -%>
42
+ <%- missing = gems.reject { |_, _, exists,| exists } -%>
43
+ <%- unless missing.empty? then -%>
44
44
  <h2>Missing Gem Documentation</h2>
45
45
 
46
46
  <p>You are missing documentation for some of your installed gems.
@@ -53,11 +53,10 @@
53
53
  the following commands.
54
54
 
55
55
  <ul>
56
- <% names = missing.map { |name,| name.sub(/-([^-]*)$/, '') }.uniq %>
57
- <% names.each do |name| %>
56
+ <%- names = missing.map { |name,| name.sub(/-([^-]*)$/, '') }.uniq -%>
57
+ <%- names.each do |name| -%>
58
58
  <li><kbd>gem rdoc <%=h name %></kbd>
59
- <% end %>
59
+ <%- end -%>
60
60
  </ul>
61
- <% end %>
61
+ <%- end -%>
62
62
  </main>
63
-
@@ -2,11 +2,11 @@
2
2
  <main role="main">
3
3
  <h1 class="class"><%= h @title %></h1>
4
4
 
5
- <% simple_files = @files.select { |f| f.text? } %>
6
- <% unless simple_files.empty? then %>
5
+ <%- simple_files = @files.select { |f| f.text? } -%>
6
+ <%- unless simple_files.empty? then -%>
7
7
  <h2 id="pages">Pages</h2>
8
8
  <ul>
9
- <% simple_files.sort.each do |file| %>
9
+ <%- simple_files.sort.each do |file| -%>
10
10
  <li class="file">
11
11
  <a href="<%= file.path %>"><%= h file.page_name %></a>
12
12
  <%
@@ -14,45 +14,45 @@
14
14
  table = file.parse(file.comment).table_of_contents
15
15
  unless table.empty? then %>
16
16
  <ul>
17
- <% table.each do |heading| %>
17
+ <%- table.each do |heading| -%>
18
18
  <li><a href="<%= file.path %>#<%= heading.aref %>"><%= heading.plain_html %></a>
19
- <% end %>
19
+ <%- end -%>
20
20
  </ul>
21
- <% end %>
21
+ <%- end -%>
22
22
  </li>
23
- <% end %>
23
+ <%- end -%>
24
24
  </ul>
25
- <% end %>
25
+ <%- end -%>
26
26
 
27
27
  <h2 id="classes">Classes and Modules</h2>
28
28
  <ul>
29
- <% @modsort.each do |klass| %>
29
+ <%- @modsort.each do |klass| -%>
30
30
  <li class="<%= klass.type %>">
31
31
  <a href="<%= klass.path %>"><%= klass.full_name %></a>
32
- <% table = []
32
+ <%- table = []
33
33
  table.concat klass.parse(klass.comment_location).table_of_contents
34
34
  table.concat klass.section_contents
35
35
 
36
36
  unless table.empty? then %>
37
37
  <ul>
38
- <% table.each do |item| %>
38
+ <%- table.each do |item| -%>
39
39
  <li><a href="<%= klass.path %>#<%= item.aref %>"><%= item.plain_html %></a>
40
- <% end %>
40
+ <%- end -%>
41
41
  </ul>
42
- <% end %>
42
+ <%- end -%>
43
43
  </li>
44
- <% end %>
44
+ <%- end -%>
45
45
  </ul>
46
46
 
47
47
  <h2 id="methods">Methods</h2>
48
48
  <ul>
49
- <% @store.all_classes_and_modules.map do |mod|
49
+ <%- @store.all_classes_and_modules.map do |mod|
50
50
  mod.method_list
51
51
  end.flatten.sort.each do |method| %>
52
52
  <li class="method">
53
53
  <a href="<%= method.path %>"><%= h method.pretty_name %></a>
54
54
  &mdash;
55
55
  <span class="container"><%= method.parent.full_name %></span>
56
- <% end %>
56
+ <%- end -%>
57
57
  </ul>
58
58
  </main>
data/lib/rdoc/i18n.rb CHANGED
@@ -5,6 +5,6 @@
5
5
  module RDoc::I18n
6
6
 
7
7
  autoload :Locale, 'rdoc/i18n/locale'
8
- require 'rdoc/i18n/text'
8
+ require_relative 'i18n/text'
9
9
 
10
10
  end
@@ -174,9 +174,8 @@ class RDoc::Markdown::Literals
174
174
  end
175
175
 
176
176
  def scan(reg)
177
- if m = reg.match(@string[@pos..-1])
178
- width = m.end(0)
179
- @pos += width
177
+ if m = reg.match(@string, @pos)
178
+ @pos = m.end(0)
180
179
  return true
181
180
  end
182
181
 
@@ -366,14 +365,14 @@ class RDoc::Markdown::Literals
366
365
 
367
366
  # Alphanumeric = /\p{Word}/
368
367
  def _Alphanumeric
369
- _tmp = scan(/\A(?-mix:\p{Word})/)
368
+ _tmp = scan(/\G(?-mix:\p{Word})/)
370
369
  set_failed_rule :_Alphanumeric unless _tmp
371
370
  return _tmp
372
371
  end
373
372
 
374
373
  # AlphanumericAscii = /[A-Za-z0-9]/
375
374
  def _AlphanumericAscii
376
- _tmp = scan(/\A(?-mix:[A-Za-z0-9])/)
375
+ _tmp = scan(/\G(?-mix:[A-Za-z0-9])/)
377
376
  set_failed_rule :_AlphanumericAscii unless _tmp
378
377
  return _tmp
379
378
  end
@@ -387,21 +386,21 @@ class RDoc::Markdown::Literals
387
386
 
388
387
  # Newline = /\n|\r\n?|\p{Zl}|\p{Zp}/
389
388
  def _Newline
390
- _tmp = scan(/\A(?-mix:\n|\r\n?|\p{Zl}|\p{Zp})/)
389
+ _tmp = scan(/\G(?-mix:\n|\r\n?|\p{Zl}|\p{Zp})/)
391
390
  set_failed_rule :_Newline unless _tmp
392
391
  return _tmp
393
392
  end
394
393
 
395
394
  # NonAlphanumeric = /\p{^Word}/
396
395
  def _NonAlphanumeric
397
- _tmp = scan(/\A(?-mix:\p{^Word})/)
396
+ _tmp = scan(/\G(?-mix:\p{^Word})/)
398
397
  set_failed_rule :_NonAlphanumeric unless _tmp
399
398
  return _tmp
400
399
  end
401
400
 
402
401
  # Spacechar = /\t|\p{Zs}/
403
402
  def _Spacechar
404
- _tmp = scan(/\A(?-mix:\t|\p{Zs})/)
403
+ _tmp = scan(/\G(?-mix:\t|\p{Zs})/)
405
404
  set_failed_rule :_Spacechar unless _tmp
406
405
  return _tmp
407
406
  end
@@ -176,7 +176,7 @@
176
176
  # The port to kpeg was performed by Eric Hodel and Evan Phoenix
177
177
  #
178
178
  # [dingus]: http://daringfireball.net/projects/markdown/dingus
179
- # [GFM]: http://github.github.com/github-flavored-markdown/
179
+ # [GFM]: https://github.github.com/gfm/
180
180
  # [pegmarkdown]: https://github.com/jgm/peg-markdown
181
181
  # [PHPE]: http://michelf.com/projects/php-markdown/extra/#def-list
182
182
  # [syntax]: http://daringfireball.net/projects/markdown/syntax
@@ -506,6 +506,7 @@ Block = @BlankLine*
506
506
  ( BlockQuote
507
507
  | Verbatim
508
508
  | CodeFence
509
+ | Table
509
510
  | Note
510
511
  | Reference
511
512
  | HorizontalRule
@@ -896,7 +897,8 @@ StyleBlock = < InStyleTags >
896
897
  end }
897
898
 
898
899
  Inlines = ( !@Endline Inline:i { i }
899
- | @Endline:c &Inline { c } )+:chunks @Endline?
900
+ | @Endline:c !( &{ github? } Ticks3 /[^`\n]*$/ )
901
+ &Inline { c } )+:chunks @Endline?
900
902
  { chunks }
901
903
 
902
904
  Inline = Str
@@ -1195,6 +1197,22 @@ CodeFence = &{ github? }
1195
1197
  verbatim
1196
1198
  }
1197
1199
 
1200
+ Table = &{ github? }
1201
+ TableRow:header TableLine:line TableRow+:body
1202
+ { table = RDoc::Markup::Table.new(header, line, body) }
1203
+
1204
+ TableRow = TableItem+:row "|" @Newline
1205
+ { row }
1206
+ TableItem = "|" < (!"|" !@Newline .)+ >
1207
+ { text.strip }
1208
+
1209
+ TableLine = TableColumn+:line "|" @Newline
1210
+ { line }
1211
+ TableColumn = "|" < ( "-"+ ":"? | ":" "-"* ) >
1212
+ { text.start_with?(":") ? :left :
1213
+ text.end_with?(":") ? :right : nil
1214
+ }
1215
+
1198
1216
  DefinitionList = &{ definition_lists? }
1199
1217
  ( DefinitionListItem+:list )
1200
1218
  { RDoc::Markup::List.new :NOTE, *list.flatten }