Age | Commit message (Collapse) | Author |
|
(https://github.com/ruby/rdoc/pull/1154)
* Add missing footers
In #1152 the footer partial was only added to the index.rhtml file.
This commit adds the footer partial to the other template files.
* Remove unnecessary middle divs in nav
* Simplify sidebar's overflow settings
Because sidebar needs to be scrollable, its overflow should default to auto.
Currently it's set to hidden and force individual elements to set overflow auto,
which overcomplicates things.
https://github.com/ruby/rdoc/commit/b8c2bcd8db
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11308
|
|
(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
|
|
method.
(https://github.com/ruby/rdoc/pull/1135)
* Unify top_level creation in tests
* Remove unnecessary file_name param from Parser.for
It should be always the same as the top_level's absolute_name, so there's
no point of taking it as a separate parameter.
https://github.com/ruby/rdoc/commit/97c497dfbb
|
|
While writing some Markdown documentation for Rails, I came across an
interesting case where trying to link to an instance method at the start
of a line would instead parse as an H1 heading:
```markdown
#response_body=
```
Expected:
```html
<a href=""><code>#response_body=</code></a>
```
Actual:
```html
<h1>response_body=</h1>
```
According to the CommonMark spec:
> At least one space or tab is required between the # characters and the
> heading’s contents, unless the heading is empty. Note that many
> implementations currently do not require the space. However, the space
> was required by the original ATX implementation, and it helps prevent
> things like the following from being parsed as headings:
>
> Example 64
So while some implementations do not follow this requirement, I believe
RDoc should because it makes it easy to write text similar to Example 64
(which was used in the new test) and it also enables automatically
linking to instance methods at the start of a line.
|
|
* constist ==> consist
* Tidyness ==> Tidiness
* Currentry ==> Currently
* valus ==> values
https://github.com/ruby/rdoc/commit/8412705721
|
|
,collect_tokens and pop_token
https://github.com/ruby/rdoc/commit/9ed530b8f9
|
|
Previously, any sort of "rich" markup for a definition list's label
would cause the Markdown parser to not recognize a definition list:
```ruby
md = <<~md
`one`
: This is a definition
md
doc = RDoc::Markdown.parse(md)
doc # => [doc: [para: "<code>one</code>\n: This is a definition"]]
```
This commit tweaks the grammar for Markdown definition lists so that
labels can include "rich" markup such as bold (`**`), code (```), etc:
```ruby
md = <<~md
`one`
: This is a definition
md
doc = RDoc::Markdown.parse(md)
doc # => [doc: [list: NOTE [item: ["<code>one</code>"]; [para: "This is a definition"]]]]
```
The [PHP Markdown Extra][1] Spec does not seem to specify whether or not
this should be allowed, but it is allowed in the RDoc format:
```ruby
rdoc = <<~rdoc
+code+::
This is a definition
rdoc
doc = RDoc::Markup.parse(rdoc)
doc # => [doc: [list: NOTE [item: ["+code+"]; [para: "This is a definition"]]]]
```
so accepting this change increases the parity of the two formats.
[1]: https://michelf.ca/projects/php-markdown/extra/#def-list
https://github.com/ruby/rdoc/commit/8f943bbba4
|
|
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
|
|
Attribute readers and writers can be marked as `:nodoc` to keep them
undocumented:
```ruby
attr_reader :name # :nodoc:
```
For aliases this behaviour should be the same:
```ruby
alias_method :old :new # :nodoc:
```
https://github.com/ruby/rdoc/commit/30f14e8271
|
|
https://github.com/ruby/rdoc/commit/4e14158255
|
|
https://github.com/ruby/rdoc/commit/485468f06f
|
|
Even for singleton class definition such as `class << self` that
shares the same container with the outer scope, its visibility is
separated and set to `public` by default.
https://github.com/ruby/rdoc/commit/baf26363b9
|
|
Each singleton method definition of the form `def recv.method` has
visibility separate from the outer scope and is set to `public` by
default.
https://github.com/ruby/rdoc/commit/810913a7ea
|
|
https://github.com/ruby/rdoc/commit/b2a35ee39d
|
|
`@locale` is set from `@locale_name` and loaded from `@locale_dir`
after `write_options`, and `RDoc::I18n::Locale` does not seem to
expected to be loaded.
https://github.com/ruby/rdoc/commit/fd610f7023
|
|
https://github.com/ruby/rdoc/commit/914a6af137
|
|
Constant definitions using these functions have been supported, but
since RDoc::Parser::C#gen_const_table did not consider other than
`rb_define_const` the documents for them have not been found, without
`Document-const` direvtive.
Fixes https://github.com/ruby/rdoc/issues/1067
https://github.com/ruby/rdoc/commit/cdad51a60b
|
|
When followed by non-space characters, rather it looks like a URL or a
path name on Windows.
https://github.com/ruby/rdoc/commit/72c6560773
|
|
https://github.com/ruby/rdoc/commit/4ac9be7f48
|
|
Previously only unknown word `intern` is allowed between a single-word
token before a C method. Now any single-word token, such as `inline`
which is used for `ArithmeticSequence` in enumerator.c, is allowed
instead.
https://github.com/ruby/rdoc/commit/3a214c1dd1
|
|
The change in #1055 might be a breaking change.
So, just simply wrap `token_stream` with `Array`
https://github.com/ruby/rdoc/commit/d8c19d7fa1
Co-authored-by: Jonathan Hefner <[email protected]>
|
|
https://github.com/ruby/rdoc/commit/83f0149fc1
|
|
https://github.com/ruby/rdoc/commit/dc56f6d0bd
|
|
https://github.com/ruby/rdoc/commit/1f568e049d
|
|
Calling `tokens_to_s` gets an error if `token_stream` is nil:
```
undefined method `compact' for nil:NilClass (NoMethodError)
```
So, fall back to an empty array if `@token_stream` is nil.
https://github.com/ruby/rdoc/commit/452e4a2600
|
|
(https://github.com/ruby/rdoc/pull/1015)
TIDYLINK multi-word label should not include braces.
https://github.com/ruby/rdoc/commit/41ad3191e9
|
|
test_generate in ppc64le.
We observed that this test randomly fails in the ruby/ruby Travis ppc64le case.
This commit is to pend the test_generate if the assertion for the generated
file's modified time fails in a ppc64le environment.
Note that I didn't use the word "Travis CI" or Travis CI specific environment variables
such as `TRAVIS` and `TRAVIS_CPU_ARCH`[1] in the code. Because I wanted to prioritize the
rdoc's independence from the ruby/ruby.
[1] https://docs.travis-ci.com/user/environment-variables/#default-environment-variables
https://github.com/ruby/rdoc/commit/42cdad1cf2
|
|
instead of assert.
It's better because assert_equal prints the values when it fails.
https://github.com/ruby/rdoc/commit/91d40ce8f8
|
|
not mentioned in call-seq
This allows RDoc to better generate documentation for methods
following the Ruby core documentation guide (which omits aliases
in call-seq in most cases). This makes documentation for methods
defined in C more similar to methods defined in Ruby. For methods
defined in Ruby, the method description of the aliased method is
already not used (you have to explicitly document the alias to
use it).
Internally, this adds AnyMethod#has_call_seq? and #skip_description?,
and updates Darkfish to:
* only show the method name if there is a call-seq for the method,
but the call-seq omits the method
* to omit the method description if the method is an alias or has
aliases and has a call-seq that does not include the method
See discussion in https://github.com/ruby/ruby/pull/7316 for
details.
https://github.com/ruby/rdoc/commit/e3688de49b
|
|
https://github.com/ruby/rdoc/commit/ed91c4b784
|
|
https://github.com/ruby/rdoc/commit/76192a280d
|
|
https://github.com/ruby/rdoc/commit/4b68c0728a
|
|
Fixes https://github.com/ruby/rdoc/pull/1000
https://github.com/ruby/rdoc/commit/291e2b7e8b
|
|
Fix https://github.com/ruby/rdoc/pull/995
https://github.com/ruby/rdoc/commit/1311ca8c50
|
|
Fix https://github.com/ruby/rdoc/pull/995
https://github.com/ruby/rdoc/commit/adfa7db5b9
|
|
So that fixes crash with "invalid byte sequence in US-ASCII" on
ci.rvm.jp and some RubyCIs.
https://github.com/ruby/rdoc/commit/4b416644f0
|
|
https://github.com/ruby/rdoc/commit/564be08f4b
|
|
https://github.com/ruby/rdoc/commit/157fbaf575
|
|
When the temporary path is long enough, the formatter may fold the
path and may hit a hyphen at the end of line, and miscounted.
https://github.com/ruby/rdoc/commit/5f46479543
|
|
|
|
https://github.com/ruby/rdoc/commit/f067c174da
|
|
https://github.com/ruby/rdoc/commit/fe0159de2f
Notes:
Merged: https://github.com/ruby/ruby/pull/6835
|
|
https://github.com/ruby/rdoc/commit/33925f885f
|
|
http://ci.rvm.jp/results/trunk-yjit@phosphorus-docker/4309535
http://ci.rvm.jp/results/trunk-random0@phosphorus-docker/4309536
http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/4309538
http://ci.rvm.jp/results/trunk-random2@phosphorus-docker/4309541
http://ci.rvm.jp/results/trunk-random3@phosphorus-docker/4309544
http://ci.rvm.jp/results/trunk-no-mjit@phosphorus-docker/4309550
http://ci.rvm.jp/results/trunk-yjit@phosphorus-docker/4309556
http://ci.rvm.jp/results/trunk-random0@phosphorus-docker/4309562
http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/4309564
http://ci.rvm.jp/results/trunk-random2@phosphorus-docker/4309567
http://ci.rvm.jp/results/trunk-random3@phosphorus-docker/4309570
http://rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20221127T200003Z.fail.html.gz
http://ci.rvm.jp/results/trunk-random-repeat@phosphorus-docker/4309581
http://rubyci.s3.amazonaws.com/freebsd12/ruby-master/log/20221127T203002Z.fail.html.gz
http://ci.rvm.jp/results/trunk-yjit@phosphorus-docker/4309588
|
|
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
|
|
This uses `<details><summary>heading</summary><ul>nested</ul></detail>`,
similar to how the classes and pages lists are now nested.
https://github.com/ruby/rdoc/commit/e57beff287
|
|
https://github.com/ruby/rdoc/commit/13b9da5932
|