rdoc 3.12.2 → 4.0.0.preview2
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.
- checksums.yaml +6 -6
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.autotest +3 -2
- data/DEVELOPERS.rdoc +53 -0
- data/History.rdoc +159 -25
- data/LEGAL.rdoc +12 -0
- data/Manifest.txt +56 -3
- data/README.rdoc +87 -19
- data/Rakefile +11 -2
- data/TODO.rdoc +20 -13
- data/bin/rdoc +4 -0
- data/lib/gauntlet_rdoc.rb +1 -1
- data/lib/rdoc.rb +32 -71
- data/lib/rdoc/any_method.rb +75 -21
- data/lib/rdoc/attr.rb +49 -10
- data/lib/rdoc/class_module.rb +182 -32
- data/lib/rdoc/code_object.rb +54 -12
- data/lib/rdoc/comment.rb +8 -1
- data/lib/rdoc/constant.rb +100 -6
- data/lib/rdoc/context.rb +93 -41
- data/lib/rdoc/context/section.rb +143 -28
- data/lib/rdoc/cross_reference.rb +58 -50
- data/lib/rdoc/encoding.rb +34 -29
- data/lib/rdoc/erb_partial.rb +18 -0
- data/lib/rdoc/extend.rb +117 -0
- data/lib/rdoc/generator.rb +11 -6
- data/lib/rdoc/generator/darkfish.rb +250 -62
- data/lib/rdoc/generator/json_index.rb +20 -12
- data/lib/rdoc/generator/markup.rb +10 -12
- data/lib/rdoc/generator/ri.rb +7 -60
- data/lib/rdoc/generator/template/darkfish/_head.rhtml +7 -7
- data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +16 -0
- data/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml +1 -1
- data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +14 -0
- data/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +1 -1
- data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +13 -0
- data/lib/rdoc/generator/template/darkfish/class.rhtml +15 -1
- data/lib/rdoc/generator/template/darkfish/images/arrow_up.png +0 -0
- data/lib/rdoc/generator/template/darkfish/index.rhtml +3 -3
- data/lib/rdoc/generator/template/darkfish/js/darkfish.js +7 -9
- data/lib/rdoc/generator/template/darkfish/page.rhtml +2 -0
- data/lib/rdoc/generator/template/darkfish/rdoc.css +31 -0
- data/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml +18 -0
- data/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +37 -0
- data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +3 -3
- data/lib/rdoc/include.rb +12 -3
- data/lib/rdoc/markdown.kpeg +1186 -0
- data/lib/rdoc/markdown.rb +16336 -0
- data/lib/rdoc/markdown/entities.rb +2128 -0
- data/lib/rdoc/markdown/literals_1_8.kpeg +18 -0
- data/lib/rdoc/markdown/literals_1_8.rb +454 -0
- data/lib/rdoc/markdown/literals_1_9.kpeg +22 -0
- data/lib/rdoc/markdown/literals_1_9.rb +417 -0
- data/lib/rdoc/markup.rb +69 -10
- data/lib/rdoc/markup/attr_changer.rb +2 -5
- data/lib/rdoc/markup/attribute_manager.rb +23 -14
- data/lib/rdoc/markup/attributes.rb +70 -0
- data/lib/rdoc/markup/block_quote.rb +14 -0
- data/lib/rdoc/markup/document.rb +20 -4
- data/lib/rdoc/markup/formatter.rb +17 -6
- data/lib/rdoc/markup/formatter_test_case.rb +93 -24
- data/lib/rdoc/markup/hard_break.rb +31 -0
- data/lib/rdoc/markup/heading.rb +1 -1
- data/lib/rdoc/markup/indented_paragraph.rb +14 -0
- data/lib/rdoc/markup/list.rb +23 -4
- data/lib/rdoc/markup/list_item.rb +17 -4
- data/lib/rdoc/markup/paragraph.rb +14 -0
- data/lib/rdoc/markup/parser.rb +107 -60
- data/lib/rdoc/markup/raw.rb +4 -4
- data/lib/rdoc/markup/special.rb +3 -3
- data/lib/rdoc/markup/to_ansi.rb +7 -1
- data/lib/rdoc/markup/to_html.rb +42 -14
- data/lib/rdoc/markup/to_html_crossref.rb +10 -9
- data/lib/rdoc/markup/to_html_snippet.rb +20 -4
- data/lib/rdoc/markup/to_joined_paragraph.rb +68 -0
- data/lib/rdoc/markup/to_label.rb +20 -1
- data/lib/rdoc/markup/to_markdown.rb +134 -0
- data/lib/rdoc/markup/to_rdoc.rb +36 -5
- data/lib/rdoc/markup/to_table_of_contents.rb +6 -1
- data/lib/rdoc/markup/to_tt_only.rb +11 -2
- data/lib/rdoc/markup/verbatim.rb +19 -0
- data/lib/rdoc/method_attr.rb +33 -19
- data/lib/rdoc/normal_class.rb +26 -7
- data/lib/rdoc/normal_module.rb +10 -5
- data/lib/rdoc/options.rb +95 -21
- data/lib/rdoc/parser.rb +6 -2
- data/lib/rdoc/parser/c.rb +212 -97
- data/lib/rdoc/parser/markdown.rb +23 -0
- data/lib/rdoc/parser/ruby.rb +115 -35
- data/lib/rdoc/parser/ruby_tools.rb +8 -3
- data/lib/rdoc/rd.rb +8 -4
- data/lib/rdoc/rd/block_parser.rb +1 -1
- data/lib/rdoc/rd/block_parser.ry +1 -1
- data/lib/rdoc/rdoc.rb +45 -21
- data/lib/rdoc/ri/driver.rb +322 -76
- data/lib/rdoc/ri/paths.rb +90 -31
- data/lib/rdoc/ri/store.rb +2 -353
- data/lib/rdoc/ruby_lex.rb +5 -21
- data/lib/rdoc/ruby_token.rb +2 -3
- data/lib/rdoc/rubygems_hook.rb +21 -9
- data/lib/rdoc/servlet.rb +302 -0
- data/lib/rdoc/stats.rb +28 -20
- data/lib/rdoc/store.rb +881 -0
- data/lib/rdoc/task.rb +2 -1
- data/lib/rdoc/test_case.rb +103 -1
- data/lib/rdoc/text.rb +5 -4
- data/lib/rdoc/tom_doc.rb +17 -16
- data/lib/rdoc/top_level.rb +43 -285
- data/test/MarkdownTest_1.0.3/Amps and angle encoding.text +21 -0
- data/test/MarkdownTest_1.0.3/Auto links.text +13 -0
- data/test/MarkdownTest_1.0.3/Backslash escapes.text +120 -0
- data/test/MarkdownTest_1.0.3/Blockquotes with code blocks.text +11 -0
- data/test/MarkdownTest_1.0.3/Code Blocks.text +14 -0
- data/test/MarkdownTest_1.0.3/Code Spans.text +6 -0
- data/test/MarkdownTest_1.0.3/Hard-wrapped paragraphs with list-like lines.text +8 -0
- data/test/MarkdownTest_1.0.3/Horizontal rules.text +67 -0
- data/test/MarkdownTest_1.0.3/Inline HTML (Advanced).text +15 -0
- data/test/MarkdownTest_1.0.3/Inline HTML (Simple).text +69 -0
- data/test/MarkdownTest_1.0.3/Inline HTML comments.text +13 -0
- data/test/MarkdownTest_1.0.3/Links, inline style.text +12 -0
- data/test/MarkdownTest_1.0.3/Links, reference style.text +71 -0
- data/test/MarkdownTest_1.0.3/Links, shortcut references.text +20 -0
- data/test/MarkdownTest_1.0.3/Literal quotes in titles.text +7 -0
- data/test/MarkdownTest_1.0.3/Markdown Documentation - Basics.text +306 -0
- data/test/MarkdownTest_1.0.3/Markdown Documentation - Syntax.text +888 -0
- data/test/MarkdownTest_1.0.3/Nested blockquotes.text +5 -0
- data/test/MarkdownTest_1.0.3/Ordered and unordered lists.text +131 -0
- data/test/MarkdownTest_1.0.3/Strong and em together.text +7 -0
- data/test/MarkdownTest_1.0.3/Tabs.text +21 -0
- data/test/MarkdownTest_1.0.3/Tidyness.text +5 -0
- data/test/test_attribute_manager.rb +7 -4
- data/test/test_rdoc_any_method.rb +84 -13
- data/test/test_rdoc_attr.rb +59 -9
- data/test/test_rdoc_class_module.rb +670 -73
- data/test/test_rdoc_code_object.rb +21 -1
- data/test/test_rdoc_comment.rb +1 -1
- data/test/test_rdoc_constant.rb +132 -0
- data/test/test_rdoc_context.rb +84 -18
- data/test/test_rdoc_context_section.rb +99 -15
- data/test/test_rdoc_cross_reference.rb +1 -1
- data/test/test_rdoc_encoding.rb +17 -1
- data/test/test_rdoc_extend.rb +94 -0
- data/test/test_rdoc_generator_darkfish.rb +45 -19
- data/test/test_rdoc_generator_json_index.rb +27 -7
- data/test/test_rdoc_generator_markup.rb +3 -3
- data/test/test_rdoc_generator_ri.rb +11 -9
- data/test/test_rdoc_include.rb +12 -0
- data/test/test_rdoc_markdown.rb +977 -0
- data/test/test_rdoc_markdown_test.rb +1891 -0
- data/test/test_rdoc_markup.rb +1 -1
- data/test/test_rdoc_markup_attribute_manager.rb +2 -2
- data/test/test_rdoc_markup_attributes.rb +39 -0
- data/test/test_rdoc_markup_document.rb +16 -1
- data/test/test_rdoc_markup_formatter.rb +7 -4
- data/test/test_rdoc_markup_hard_break.rb +31 -0
- data/test/test_rdoc_markup_indented_paragraph.rb +14 -0
- data/test/test_rdoc_markup_paragraph.rb +15 -1
- data/test/test_rdoc_markup_parser.rb +152 -89
- data/test/test_rdoc_markup_to_ansi.rb +23 -2
- data/test/test_rdoc_markup_to_bs.rb +24 -0
- data/test/test_rdoc_markup_to_html.rb +50 -19
- data/test/test_rdoc_markup_to_html_crossref.rb +23 -5
- data/test/test_rdoc_markup_to_html_snippet.rb +49 -8
- data/test/test_rdoc_markup_to_joined_paragraph.rb +32 -0
- data/test/test_rdoc_markup_to_label.rb +63 -1
- data/test/test_rdoc_markup_to_markdown.rb +352 -0
- data/test/test_rdoc_markup_to_rdoc.rb +22 -2
- data/test/test_rdoc_markup_to_table_of_contents.rb +44 -39
- data/test/test_rdoc_markup_to_tt_only.rb +20 -0
- data/test/test_rdoc_markup_verbatim.rb +13 -0
- data/test/test_rdoc_method_attr.rb +5 -0
- data/test/test_rdoc_normal_class.rb +24 -5
- data/test/test_rdoc_normal_module.rb +1 -1
- data/test/test_rdoc_options.rb +21 -6
- data/test/test_rdoc_parser.rb +24 -0
- data/test/test_rdoc_parser_c.rb +151 -26
- data/test/test_rdoc_parser_markdown.rb +55 -0
- data/test/test_rdoc_parser_rd.rb +2 -2
- data/test/test_rdoc_parser_ruby.rb +468 -109
- data/test/test_rdoc_parser_simple.rb +2 -2
- data/test/test_rdoc_rd_block_parser.rb +0 -4
- data/test/test_rdoc_rdoc.rb +110 -22
- data/test/test_rdoc_ri_driver.rb +415 -80
- data/test/test_rdoc_ri_paths.rb +122 -13
- data/test/test_rdoc_ruby_lex.rb +5 -61
- data/test/test_rdoc_ruby_token.rb +19 -0
- data/test/test_rdoc_rubygems_hook.rb +64 -43
- data/test/test_rdoc_servlet.rb +429 -0
- data/test/test_rdoc_stats.rb +83 -24
- data/test/{test_rdoc_ri_store.rb → test_rdoc_store.rb} +395 -22
- data/test/test_rdoc_task.rb +2 -2
- data/test/test_rdoc_text.rb +37 -11
- data/test/test_rdoc_tom_doc.rb +59 -62
- data/test/test_rdoc_top_level.rb +71 -113
- data/test/xref_test_case.rb +7 -9
- metadata +122 -39
- metadata.gz.sig +0 -0
- data/CVE-2013-0256.rdoc +0 -49
- data/lib/rdoc/markup/attribute.rb +0 -51
@@ -0,0 +1,21 @@
|
|
1
|
+
AT&T has an ampersand in their name.
|
2
|
+
|
3
|
+
AT&T is another way to write it.
|
4
|
+
|
5
|
+
This & that.
|
6
|
+
|
7
|
+
4 < 5.
|
8
|
+
|
9
|
+
6 > 5.
|
10
|
+
|
11
|
+
Here's a [link] [1] with an ampersand in the URL.
|
12
|
+
|
13
|
+
Here's a link with an amersand in the link text: [AT&T] [2].
|
14
|
+
|
15
|
+
Here's an inline [link](/script?foo=1&bar=2).
|
16
|
+
|
17
|
+
Here's an inline [link](</script?foo=1&bar=2>).
|
18
|
+
|
19
|
+
|
20
|
+
[1]: http://example.com/?foo=1&bar=2
|
21
|
+
[2]: http://att.com/ "AT&T"
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Link: <http://example.com/>.
|
2
|
+
|
3
|
+
With an ampersand: <http://example.com/?foo=1&bar=2>
|
4
|
+
|
5
|
+
* In a list?
|
6
|
+
* <http://example.com/>
|
7
|
+
* It should.
|
8
|
+
|
9
|
+
> Blockquoted: <http://example.com/>
|
10
|
+
|
11
|
+
Auto-links should not occur here: `<http://example.com/>`
|
12
|
+
|
13
|
+
or here: <http://example.com/>
|
@@ -0,0 +1,120 @@
|
|
1
|
+
These should all get escaped:
|
2
|
+
|
3
|
+
Backslash: \\
|
4
|
+
|
5
|
+
Backtick: \`
|
6
|
+
|
7
|
+
Asterisk: \*
|
8
|
+
|
9
|
+
Underscore: \_
|
10
|
+
|
11
|
+
Left brace: \{
|
12
|
+
|
13
|
+
Right brace: \}
|
14
|
+
|
15
|
+
Left bracket: \[
|
16
|
+
|
17
|
+
Right bracket: \]
|
18
|
+
|
19
|
+
Left paren: \(
|
20
|
+
|
21
|
+
Right paren: \)
|
22
|
+
|
23
|
+
Greater-than: \>
|
24
|
+
|
25
|
+
Hash: \#
|
26
|
+
|
27
|
+
Period: \.
|
28
|
+
|
29
|
+
Bang: \!
|
30
|
+
|
31
|
+
Plus: \+
|
32
|
+
|
33
|
+
Minus: \-
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
These should not, because they occur within a code block:
|
38
|
+
|
39
|
+
Backslash: \\
|
40
|
+
|
41
|
+
Backtick: \`
|
42
|
+
|
43
|
+
Asterisk: \*
|
44
|
+
|
45
|
+
Underscore: \_
|
46
|
+
|
47
|
+
Left brace: \{
|
48
|
+
|
49
|
+
Right brace: \}
|
50
|
+
|
51
|
+
Left bracket: \[
|
52
|
+
|
53
|
+
Right bracket: \]
|
54
|
+
|
55
|
+
Left paren: \(
|
56
|
+
|
57
|
+
Right paren: \)
|
58
|
+
|
59
|
+
Greater-than: \>
|
60
|
+
|
61
|
+
Hash: \#
|
62
|
+
|
63
|
+
Period: \.
|
64
|
+
|
65
|
+
Bang: \!
|
66
|
+
|
67
|
+
Plus: \+
|
68
|
+
|
69
|
+
Minus: \-
|
70
|
+
|
71
|
+
|
72
|
+
Nor should these, which occur in code spans:
|
73
|
+
|
74
|
+
Backslash: `\\`
|
75
|
+
|
76
|
+
Backtick: `` \` ``
|
77
|
+
|
78
|
+
Asterisk: `\*`
|
79
|
+
|
80
|
+
Underscore: `\_`
|
81
|
+
|
82
|
+
Left brace: `\{`
|
83
|
+
|
84
|
+
Right brace: `\}`
|
85
|
+
|
86
|
+
Left bracket: `\[`
|
87
|
+
|
88
|
+
Right bracket: `\]`
|
89
|
+
|
90
|
+
Left paren: `\(`
|
91
|
+
|
92
|
+
Right paren: `\)`
|
93
|
+
|
94
|
+
Greater-than: `\>`
|
95
|
+
|
96
|
+
Hash: `\#`
|
97
|
+
|
98
|
+
Period: `\.`
|
99
|
+
|
100
|
+
Bang: `\!`
|
101
|
+
|
102
|
+
Plus: `\+`
|
103
|
+
|
104
|
+
Minus: `\-`
|
105
|
+
|
106
|
+
|
107
|
+
These should get escaped, even though they're matching pairs for
|
108
|
+
other Markdown constructs:
|
109
|
+
|
110
|
+
\*asterisks\*
|
111
|
+
|
112
|
+
\_underscores\_
|
113
|
+
|
114
|
+
\`backticks\`
|
115
|
+
|
116
|
+
This is a code span with a literal backslash-backtick sequence: `` \` ``
|
117
|
+
|
118
|
+
This is a tag with unescaped backticks <span attr='`ticks`'>bar</span>.
|
119
|
+
|
120
|
+
This is a tag with backslashes <span attr='\\backslashes\\'>bar</span>.
|
@@ -0,0 +1,67 @@
|
|
1
|
+
Dashes:
|
2
|
+
|
3
|
+
---
|
4
|
+
|
5
|
+
---
|
6
|
+
|
7
|
+
---
|
8
|
+
|
9
|
+
---
|
10
|
+
|
11
|
+
---
|
12
|
+
|
13
|
+
- - -
|
14
|
+
|
15
|
+
- - -
|
16
|
+
|
17
|
+
- - -
|
18
|
+
|
19
|
+
- - -
|
20
|
+
|
21
|
+
- - -
|
22
|
+
|
23
|
+
|
24
|
+
Asterisks:
|
25
|
+
|
26
|
+
***
|
27
|
+
|
28
|
+
***
|
29
|
+
|
30
|
+
***
|
31
|
+
|
32
|
+
***
|
33
|
+
|
34
|
+
***
|
35
|
+
|
36
|
+
* * *
|
37
|
+
|
38
|
+
* * *
|
39
|
+
|
40
|
+
* * *
|
41
|
+
|
42
|
+
* * *
|
43
|
+
|
44
|
+
* * *
|
45
|
+
|
46
|
+
|
47
|
+
Underscores:
|
48
|
+
|
49
|
+
___
|
50
|
+
|
51
|
+
___
|
52
|
+
|
53
|
+
___
|
54
|
+
|
55
|
+
___
|
56
|
+
|
57
|
+
___
|
58
|
+
|
59
|
+
_ _ _
|
60
|
+
|
61
|
+
_ _ _
|
62
|
+
|
63
|
+
_ _ _
|
64
|
+
|
65
|
+
_ _ _
|
66
|
+
|
67
|
+
_ _ _
|
@@ -0,0 +1,69 @@
|
|
1
|
+
Here's a simple block:
|
2
|
+
|
3
|
+
<div>
|
4
|
+
foo
|
5
|
+
</div>
|
6
|
+
|
7
|
+
This should be a code block, though:
|
8
|
+
|
9
|
+
<div>
|
10
|
+
foo
|
11
|
+
</div>
|
12
|
+
|
13
|
+
As should this:
|
14
|
+
|
15
|
+
<div>foo</div>
|
16
|
+
|
17
|
+
Now, nested:
|
18
|
+
|
19
|
+
<div>
|
20
|
+
<div>
|
21
|
+
<div>
|
22
|
+
foo
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
This should just be an HTML comment:
|
28
|
+
|
29
|
+
<!-- Comment -->
|
30
|
+
|
31
|
+
Multiline:
|
32
|
+
|
33
|
+
<!--
|
34
|
+
Blah
|
35
|
+
Blah
|
36
|
+
-->
|
37
|
+
|
38
|
+
Code block:
|
39
|
+
|
40
|
+
<!-- Comment -->
|
41
|
+
|
42
|
+
Just plain comment, with trailing spaces on the line:
|
43
|
+
|
44
|
+
<!-- foo -->
|
45
|
+
|
46
|
+
Code:
|
47
|
+
|
48
|
+
<hr />
|
49
|
+
|
50
|
+
Hr's:
|
51
|
+
|
52
|
+
<hr>
|
53
|
+
|
54
|
+
<hr/>
|
55
|
+
|
56
|
+
<hr />
|
57
|
+
|
58
|
+
<hr>
|
59
|
+
|
60
|
+
<hr/>
|
61
|
+
|
62
|
+
<hr />
|
63
|
+
|
64
|
+
<hr class="foo" id="bar" />
|
65
|
+
|
66
|
+
<hr class="foo" id="bar"/>
|
67
|
+
|
68
|
+
<hr class="foo" id="bar" >
|
69
|
+
|
@@ -0,0 +1,71 @@
|
|
1
|
+
Foo [bar] [1].
|
2
|
+
|
3
|
+
Foo [bar][1].
|
4
|
+
|
5
|
+
Foo [bar]
|
6
|
+
[1].
|
7
|
+
|
8
|
+
[1]: /url/ "Title"
|
9
|
+
|
10
|
+
|
11
|
+
With [embedded [brackets]] [b].
|
12
|
+
|
13
|
+
|
14
|
+
Indented [once][].
|
15
|
+
|
16
|
+
Indented [twice][].
|
17
|
+
|
18
|
+
Indented [thrice][].
|
19
|
+
|
20
|
+
Indented [four][] times.
|
21
|
+
|
22
|
+
[once]: /url
|
23
|
+
|
24
|
+
[twice]: /url
|
25
|
+
|
26
|
+
[thrice]: /url
|
27
|
+
|
28
|
+
[four]: /url
|
29
|
+
|
30
|
+
|
31
|
+
[b]: /url/
|
32
|
+
|
33
|
+
* * *
|
34
|
+
|
35
|
+
[this] [this] should work
|
36
|
+
|
37
|
+
So should [this][this].
|
38
|
+
|
39
|
+
And [this] [].
|
40
|
+
|
41
|
+
And [this][].
|
42
|
+
|
43
|
+
And [this].
|
44
|
+
|
45
|
+
But not [that] [].
|
46
|
+
|
47
|
+
Nor [that][].
|
48
|
+
|
49
|
+
Nor [that].
|
50
|
+
|
51
|
+
[Something in brackets like [this][] should work]
|
52
|
+
|
53
|
+
[Same with [this].]
|
54
|
+
|
55
|
+
In this case, [this](/somethingelse/) points to something else.
|
56
|
+
|
57
|
+
Backslashing should suppress \[this] and [this\].
|
58
|
+
|
59
|
+
[this]: foo
|
60
|
+
|
61
|
+
|
62
|
+
* * *
|
63
|
+
|
64
|
+
Here's one where the [link
|
65
|
+
breaks] across lines.
|
66
|
+
|
67
|
+
Here's another where the [link
|
68
|
+
breaks] across lines, but with a line-ending space.
|
69
|
+
|
70
|
+
|
71
|
+
[link breaks]: /url/
|