Age | Commit message (Collapse) | Author |
|
(https://github.com/ruby/rdoc/pull/1184)
https://github.com/ruby/rdoc/commit/7b68545094
|
|
(https://github.com/ruby/rdoc/pull/1144)
* Add a new ruby parser RDoc::Parser::PrismRuby
* Add a new ruby parser testcase independent from parser's internal implementation
* unknown meta method
* Use MethodSignatureVisitor only to scan params, block_params and calls_super
* Add calls_super test
* Drop ruby 2.6. Prism requires ruby >= 2.7
* Remove duplicated documentation comment from prism_ruby.rb
* Add test for wrong argument passed to metaprogramming method
* Rename visit_call_[DSL_METHOD_NAME] to make it distinguishable from visit_[NODE_TYPE]_node
* Method receiver switch of true/false/nil to a case statement
* Extract common part of add_method(by def keyword) and add meta_comment method
* Reuse consecutive comments array when collecting comments
* Simplify DSL call_node handling
* Refactor extracting method visibility arguments
https://github.com/ruby/rdoc/commit/fde99f1be6
|
|
(https://github.com/ruby/rdoc/pull/1139)
* Rename rake rubocop to rake format_generated_files
* Add rubocop rules to ensure spaces are applied consistently
* Improve rubocop related CI workflows
https://github.com/ruby/rdoc/commit/27932d001c
|
|
Previously, trying to round-trip label-list and name-lists with the
ToRdoc converter was not possible:
```ruby
doc = <<~RDOC
foo ::
bar ::
hi
RDOC
markup = RDoc::Markup.parse(doc)
markup # => [doc: [list: NOTE [item: ["foo ", "bar"]; [para: "hi"]]]]
rt = RDoc::Markup::ToRdoc.new.convert(markup)
rt # => "foo\nbar:\n hi\n\n"
rt_markup = RDoc::Markup.parse(rt)
rt_markup # => [doc: [para: "foo ", "bar:"], [verb: "hi\n"]]
```
This commit addresses the issue by fixing ToRdoc to generate output that
can be properly reparsed by RDoc. ToRdoc tests additionally needed to be
updated for the new output.
The old implementation of `accept_list_item_start` was copied to ToBs
because those tests did not pass with the new changes and I am
unfamiliar with the `backspace` format.
After:
```ruby
doc = <<~RDOC
foo ::
bar ::
hi
RDOC
markup = RDoc::Markup.parse(doc)
markup # => [doc: [list: NOTE [item: ["foo ", "bar"]; [para: "hi"]]]]
rt = RDoc::Markup::ToRdoc.new.convert(markup)
rt # => "foo::\nbar::\n hi\n\n"
rt_markup = RDoc::Markup.parse(rt)
rt_markup # => [doc: [list: NOTE [item: ["foo", "bar"]; [para: "hi"], blankline]]]
```
https://github.com/ruby/rdoc/commit/c6c51aa900
|
|
Previously, using ToMarkdown on a label-list would generate output that
could not be reparsed by the RDoc::Markdown parser:
```
md = <<~MD
apple
: a red fruit
banana
: a yellow fruit
MD
doc = RDoc::Markdown.parse(md)
doc # => [doc: [list: NOTE [item: ["apple"]; [para: "a red fruit"]], [item: ["banana"]; [para: "a yellow fruit"]]]]
new_md = doc.accept(RDoc::Markup::ToMarkdown.new)
new_md # => "apple\n: a red fruit\nbanana\n: a yellow fruit\n\n"
new_doc = RDoc::Markdown.parse(new_md)
new_doc # => [doc: [list: NOTE [item: ["apple"]; [para: "a red fruit\nbanana\n: a yellow fruit"]]]]
```
The issue is that the [PHP Markdown Extra spec][1] requires a newline
after each definition list item, but ToMarkdown was not putting newlines
between label-list items.
This commit fixes the issue by properly appending a newline after each
label-list item so that the output of ToMarkdown can be reparsed by
RDoc::Markdown:
```
md = <<~MD
apple
: a red fruit
banana
: a yellow fruit
MD
doc = RDoc::Markdown.parse(mdoc)
doc # => [doc: [list: NOTE [item: ["apple"]; [para: "a red fruit"]], [item: ["banana"]; [para: "a yellow fruit"]]]]
new_md = doc.accept(RDoc::Markup::ToMarkdown.new)
new_md # => "apple\n: a red fruit\n\nbanana\n: a yellow fruit\n\n"
new_doc = RDoc::Markdown.parse(new_md)
new_doc # => [doc: [list: NOTE [item: ["apple"]; [para: "a red fruit"]], [item: ["banana"]; [para: "a yellow fruit"]]]]
```
[1]: https://michelf.ca/projects/php-markdown/extra/#def-list
https://github.com/ruby/rdoc/commit/c65266437c
|
|
https://github.com/ruby/rdoc/commit/914a6af137
|
|
https://github.com/ruby/rdoc/commit/f7dd147a8c
|
|
https://github.com/ruby/rdoc/commit/e4c90340d0
|
|
https://github.com/ruby/rdoc/commit/1f568e049d
|
|
(https://github.com/ruby/rdoc/pull/1015)
TIDYLINK multi-word label should not include braces.
https://github.com/ruby/rdoc/commit/41ad3191e9
|
|
* The same as used in irb: https://github.com/ruby/irb/pull/134/files
* This works on all Ruby implementations, unlike `return` in BEGIN which
can be quite difficult to support.
https://github.com/ruby/rdoc/commit/d19f7c66fe
|
|
https://github.com/ruby/rdoc/commit/76192a280d
|
|
https://github.com/ruby/rdoc/commit/4b68c0728a
|
|
Also empty document of `Object`.
https://github.com/ruby/rdoc/commit/ce32a3102b
|
|
This reverts commit https://github.com/ruby/rdoc/commit/41ceae93b3bc.
https://github.com/ruby/rdoc/commit/5d2c47e8b8
|
|
Make verbatims text or newline only, and simplify `build_verbatim`.
https://github.com/ruby/rdoc/commit/41ceae93b3
|
|
https://github.com/ruby/rdoc/commit/a976fb9d39
|
|
https://github.com/ruby/rdoc/commit/ac35485be6
|
|
https://hackerone.com/reports/1187156
https://github.com/ruby/rdoc/commit/7cecf1efae
|
|
https://hackerone.com/reports/1187156
https://github.com/ruby/rdoc/commit/1ad2dd3ca2
|
|
https://github.com/ruby/rdoc/commit/b16d3f1727
|
|
https://github.com/ruby/rdoc/commit/75eee668a5
|
|
Reported at https://github.com/ruby/rdoc/pull/907#discussion_r932505816
https://github.com/ruby/rdoc/commit/86384ac7f9
|
|
Protected characters with `PROTECT_ATTR` should not have special
roles.
https://github.com/ruby/rdoc/commit/c318af0ea2
|
|
Only valid characters for URLs should be used for generating URLs.
A list of valid characters can be found in sections 2.2 and 2.3 of IETF
RFC 3986 (https://www.ietf.org/rfc/rfc3986.txt).
https://github.com/ruby/rdoc/commit/2bd8fcdd4f
|
|
RDoc is using only CGI.escape, escapeHTML, and unescape.
We don't have to load the whole source code of cgi gem.
https://github.com/ruby/rdoc/commit/d096222cc2
|
|
https://github.com/ruby/rdoc/commit/45e33c4b85
|
|
https://github.com/ruby/rdoc/commit/45c92005fe
|
|
https://github.com/ruby/rdoc/commit/424bd5db4d
|
|
https://github.com/ruby/rdoc/commit/caf234665c
|
|
https://github.com/ruby/rdoc/commit/85bb2d33bb
|
|
While links to generated HTML from RDoc file needs to be prefixed
by "rdoc-ref:" currently, in case of explicit references this
seems just redundant.
Also GitHub RDoc support does not work with this prefix.
This patch lets links to such document texts (".rb", ".rdoc" and
".md" now) refer URLs generated by `RDoc::TopLevel#http_url`
without the prefix.
https://github.com/ruby/rdoc/commit/f18b27b69d
|
|
And exclusive notations don't exclude other exclusive notations.
https://github.com/ruby/rdoc/commit/b8baa9a435
|
|
https://github.com/ruby/rdoc/commit/8222f85a17
|
|
https://github.com/ruby/rdoc/commit/0cd3b55210
|
|
https://github.com/ruby/rdoc/commit/9dc933df16
Notes:
Merged: https://github.com/ruby/ruby/pull/4274
|
|
|
|
https://github.com/ruby/rdoc/commit/54500cf12a
|
|
The crossref must be linked before tidylink because Klass.method[:sym] will be
processed as a tidylink first and will be broken.
https://github.com/ruby/rdoc/commit/0f47baf6d2
|
|
The following is invalid HTML:
<a href="Array.html#method-i-3C-3C"><code><<</code></a></p>
Incorrect:
<code><<</code>
Correct:
<code><<</code>
Fixes #761
https://github.com/ruby/rdoc/commit/b120d087f6
|
|
|
|
|
|
|
|
standalone gem.
|
|
Minitest 6 will err `assert_equal` with `nil`.
https://github.com/seattlerb/minitest/issues/779
|
|
|
|
This change introduces a wrapper of StringScanner that is aware of the
current position (column and lineno).
It has two advantages: faster and more modular.
The old code frequently runs `@input.byteslice(0, byte_offset).length`
to get the current position, but it was painfully slow. This change
keeps track of the position at each scan, which reduces about half of
time of "Generating RI format into ..." in Ruby's `make rdoc`
(5.5 sec -> 3.0 sec).
And the old code used four instance variables (`@input`, `@line`,
`@line_pos`, and `@s`) to track the position. This change factors them
out into MyStringScanner, so now only one variable (`@s`) is needed.
|
|
A previous change made the header's id be fully referenced (for the sidebar I believe) but this broke links to them.
This fixes the issue.
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
`@res` is an Array, so `@res =~ /\n\z/` calls `Object#=~` which always
returns nil.
I guess it should be `@res.last =~ /\n\z/`, but the change causes test
failures.
This bug was found during work for removal of `Object#=~`.
[Feature #15231]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|