Commit graph

712 commits

Author SHA1 Message Date
aycabta
61e1cf23ac [ruby/rdoc] Treat emphasis tags as excluding other notations
And exclusive notations don't exclude other exclusive notations.

b8baa9a435
2021-04-03 01:21:50 +09:00
aycabta
e84d275fe6 [ruby/rdoc] Treat other tags as word boundaries
8222f85a17
2021-04-03 01:21:38 +09:00
aycabta
54aa11efa8 [ruby/rdoc] Disable other notations in <code> tags
0cd3b55210
2021-04-03 01:21:12 +09:00
Nobuyoshi Nakada
fad3412d47 [ruby/rdoc] Get rid of a trailing space
7b7b91768e
2021-03-16 15:47:27 +09:00
aycabta
ff9a008871 [ruby/rdoc] Suppress unused variable warning of "text"
3a4120b155
2021-03-16 15:47:27 +09:00
aycabta
61a29a41e1 [ruby/rdoc] Allow empty .rdoc_options
0c8cb25b50
2021-03-16 15:47:27 +09:00
aycabta
971a0cd246 [ruby/rdoc] Allow partial default values to be overridden with .rdoc_options
e14800891f
2021-03-16 15:47:27 +09:00
Nobuyoshi Nakada
de8e6218a3 [ruby/rdoc] Fixed CodeFence without blank lines
Currently a fenced code block needs a preceding blank line, it
should not be required, as:
https://github.github.com/gfm/#fenced-code-blocks
> A fenced code block may interrupt a paragraph, and does not
> require a blank line either before or after.

Just recommended:
https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks
> We recommend placing a blank line before and after code blocks
> to make the raw formatting easier to read.

0e1776caf3
2021-03-16 15:47:27 +09:00
Nobuyoshi Nakada
10b082064e [ruby/rdoc] Add table style
2219c5ae80
2021-03-16 15:47:27 +09:00
Nobuyoshi Nakada
3651f678a7 [ruby/rdoc] Support GFM table
9dc933df16
2021-03-16 15:47:27 +09:00
Pankaj Doharey
05898c5b90 [ruby/rdoc] Update Rdoc.css sidebar panel.
Updates css so the sidebar look like a panel instead of looking like chopped edges.

b0098c6d72
2021-03-16 15:47:27 +09:00
Nobuyoshi Nakada
19e6d27126 [ruby/rdoc] Support iso-strict format in git-log
2a6c22da63
2021-01-25 18:33:33 +09:00
Nobuyoshi Nakada
7fe22152fc [ruby/rdoc] Support other date formats in git-log
ad8cf37d72
2021-01-25 18:33:31 +09:00
Nobuyoshi Nakada
52ebaf718e [ruby/rdoc] Skip non-date logs by git-log
`RDoc::Parser::ChangeLog` mis-parses ChangeLog generated by
git-log, because of too heuristic `Time.parse`.

For instance, "commit 8187228de0"
results in "8187-08-16", that is, day 228 in the year 8187.

9711e6f6d9
2021-01-24 16:46:27 +09:00
Nobuyoshi Nakada
d5d1c41728 [ruby/rdoc] Sort by CommitDate if available
455715e930
2021-01-24 16:46:25 +09:00
Nobuyoshi Nakada
fa048a0f85 [ruby/rdoc] Add links to the commits
1821628076
2021-01-24 16:46:23 +09:00
Nobuyoshi Nakada
f3f1a666c7 [ruby/rdoc] Shorten commit hashes
5d3e153963
2021-01-24 16:46:21 +09:00
Nobuyoshi Nakada
127f735c1e [ruby/rdoc] Tweak log entry markdown
* add 3 levels to headings
* prefix commit log to labels to make unique IDs

5074c13209
2021-01-24 16:46:19 +09:00
Nobuyoshi Nakada
b88d1e6b44 [ruby/rdoc] Make each commit entries h3
11eefb2ae9
2021-01-24 16:46:17 +09:00
Nobuyoshi Nakada
bb570ce6d8 [ruby/rdoc] Support ChangeLog generated by git log
5e0a123ca1
2021-01-24 16:46:15 +09:00
Dorian Marié
68e7dc532d [ruby/rdoc] Fix failing test by adding gettext as a development dependency
The failing test was:

========================================================================================
rdoc/test/rdoc/test_rdoc_i18n_locale.rb:35:in `rescue in test_load_existent_po'
Omission: gettext gem is not found [test_load_existent_po(TestRDocI18nLocale)]
========================================================================================

e5f85839e1
2021-01-24 16:46:11 +09:00
Hiroshi SHIBATA
95ce5c0ee9 [ruby/rdoc] Bump version to 6.3.0
3d3616cb94
2020-12-21 16:22:08 +09:00
Nobuyoshi Nakada
288e93bea8
Exclude parenthesized function declarations such as NORETURN
Fixes https://github.com/ruby/ruby/pull/3883
2020-12-11 13:43:18 +09:00
Kazuhiro NISHIYAMA
d5dfc3f2c8
Use abort(message) instead of puts and exit 2020-12-10 21:06:10 +09:00
Hiroshi SHIBATA
e7433a3288 Added help message for gem i webrick in rdoc 2020-12-10 18:06:25 +09:00
Hiroshi SHIBATA
e8f8e63f0a
Backport cosmetic changes from upstream repo that is ruby/rdoc 2020-11-12 21:05:59 +09:00
Nobuyoshi Nakada
3198e7abd7
Separate send into public_send and __send__ 2020-10-27 16:12:45 +09:00
aycabta
305c430603 [ruby/rdoc] Add man/ri.1 for distribution files
7cb5c3611f
2020-09-18 14:57:58 +09:00
Dorian Marié
0d56aec1dd [ruby/rdoc] Fix spelling error in parser comment
f237c9e223
2020-09-18 14:57:58 +09:00
Nobuyoshi Nakada
e23f0f29da [ruby/rdoc] update all files if any file is newer
Cross references need parse all files which define the subject
names.  This commit makes `--force-update` option enforce to parse
all files if any file is newer than the previous parse, not only
updated files.

13e9a44896
2020-09-18 14:57:58 +09:00
aycabta
b5db9b8a31 [ruby/rdoc] Support full filename to make a link for a text file
41db49c485
2020-09-18 14:57:57 +09:00
Marc-Andre Lafortune
867f0c6793 [ruby/rdoc] Prefer require_relative 2020-09-14 12:59:11 -04:00
hyrious
02951a45f0 [ruby/rdoc] Create link to unary operator methods correctly
54500cf12a
2020-07-22 02:35:12 +09:00
Benoit Tigeot
7693aa7056 [ruby/rdoc] Remove empty lines from html file by using ERB trim_mode flag
9e27299a46
2020-07-22 02:34:58 +09:00
Jeremy Evans
38480ad507 [ruby/rdoc] Fix parsing of rb_define_module_under
Fixes Ruby Bug #15819

94a052d833
2020-07-22 02:34:49 +09:00
aycabta
f76d67f484 [ruby/rdoc] Fix RDoc::Context#instance_method_list
The warn method returns nil, it's a bug of #instance_method_list.

a20df89263
2020-07-22 02:34:26 +09:00
Nobuyoshi Nakada
9a78e24f7d
Removed nonsense rubygems_version in input gemspec files
As it is ignored and set at building packages automatically, it is
just nonsense to set in gemspec file for input.
2020-06-25 15:44:56 +09:00
David Rodríguez
3169ffc0d6 [ruby/rdoc] Add frozen string literal support
daac9d0471
2020-05-24 23:47:24 +09:00
aycabta
37b8a7afca [ruby/rdoc] Add instance_methods because instance_method_list should be obsolete
9b1da32254
2020-05-24 23:47:24 +09:00
Nobuyoshi Nakada
e6d1363ae6 [ruby/rdoc] Fixed inverted CSS for note-list and label-list
a13d6439da
2020-05-24 23:47:24 +09:00
aycabta
32e0ff26e0 [ruby/rdoc] Delegate ERB args correctly
82ff37a822
2020-05-24 23:47:24 +09:00
Jeremy Evans
7e7981c84f [ruby/rdoc] Treat multiple Ruby methods calling the same C method as aliases
Previously, only calls to rb_define_alias were treated as aliases.
This treats calls to rb_define_method with the same C function as
aliases, with the first function defined being the primary method.

This move the dedup code from the C parser to AnyMethod, and has
AnyMethod look in its aliases to find the call_seq.

Switch the deduplication code to remove lines matching one of the
other aliases, instead of only keeping lines matching the current
alias.  The previous approach could eliminate all call_seq lines
in cases where no line matched.  This was necessary to pass
tests when call_seq does deduplication by default.

The only change to the darkfish template is to not perform
unnecessary work by deduplicating twice.

0ead78616b
2020-05-24 23:47:24 +09:00
aycabta
f52a4690f8 [ruby/rdoc] Process crossref before tidylink
The crossref must be linked before tidylink because Klass.method[:sym] will be
processed as a tidylink first and will be broken.

0f47baf6d2
2020-05-24 23:47:24 +09:00
Nate Matykiewicz
c79f9ea606 [ruby/rdoc] Escape method names in HTML
The following is invalid HTML:
<a href="Array.html#method-i-3C-3C"><code><<</code></a></p>

Incorrect:
<code><<</code>

Correct:
<code>&lt;&lt;</code>

Fixes #761

b120d087f6
2020-05-24 23:47:24 +09:00
Hiroshi SHIBATA
5c6269c459
Support XDG_* (#2174)
* Support XDG_CONFIG_HOME for gemrc.

* Support XDG_DATA_HOME for .gem

* Added test for XDG_DATA_HOME

* Do not reuse environmental variable.

* Unify .rdoc path to RDoc.home.

* Support XDG_DATA_HOME for .rdoc

* Ignore exists?

* Extracted config_home path

* Use XDG_CONFIG_HOME for default credential path

* Fixed inconsistency location.

* Fixed the broken tests.

* Support XDG_CONFIG_HOME for irbrc

* Introduce Gem.cache_home as XDG_CACHE_HOME

* Use Gem.cache_home instead of Gem.config_home for the credential file of RubyGems.

* Initialized the old configurations

* Fixed test failure related the configuration initialization

* restore XDG_DATA_HOME

* Fixed the broken examples of bundler with XDG_*

* Do not modify environmental variable on test file

* Use XDG_DATA_HOME insted of XDG_CACHE_HOME for credential file

* stub out Gem.data_home

* Move dir accessor to defaults.rb file

* Use XDG_DATA_HOME for signed gem features

* Use XDG_DATA_HOME for spec cache

* Do not rely on Gem.user_home

* Gem.user_home is always exists. Don't need to use FileUitls.mkdir_p

* Bump support version to RubyGems 3.2.0+

* Removed the needless fallback configuration

* Fixed the inconsistency methods that are find_config_file and config_file

* Use Gem.configuration.credentials_path instead of hard-coded path

* gem_path is always provided

* Removed the duplicated code of find_home

* Also removed the duplicated code of user_home

* use Gem::UNTAINT instead of untaint for surpressing the warnings

* Use File.directory

* Restore XDG_DATA_HOME

* Use File.write
2020-04-23 19:16:06 +09:00
Nobuyoshi Nakada
14e013cdbb [ruby/rdoc] Drop old rubies
* `RbConfig::CONFIG['ridir']` has been set since 1.9.2

* `ENV["HOME"]` has been defaulted to `USERPROFILE` since 1.9.0,
  and backported to 1.8.5 or later.

a3a614e676
2020-04-23 15:13:27 +09:00
Nobuyoshi Nakada
2b7409a2f2
Specify explicit separator not to be affected by $; 2020-03-08 17:38:37 +09:00
Nobuyoshi Nakada
f5abcf767e [ruby/rdoc] Removed RDoc::Context::Section#sequence
It has been deprecated since 2011.

5c2aa0f77d
2020-02-20 18:06:19 +09:00
aycabta
30c5e8c4b9 [ruby/rdoc] Version 6.2.1
c65e14d112
2019-12-24 08:04:01 +09:00
aycabta
2bf0743edc Update parsers of RDoc that are generated by Racc 2019-12-24 07:58:53 +09:00