Граф коммитов

119 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 5b1db79129 [ruby/rdoc] Revert "Refactor `RDoc::Markup::Parser#tokenize`"
This reverts commit https://github.com/ruby/rdoc/commit/41ceae93b3bc.

https://github.com/ruby/rdoc/commit/5d2c47e8b8
2022-11-27 19:46:12 +00:00
Nobuyoshi Nakada 21977b95e2 [ruby/rdoc] Refactor `RDoc::Markup::Parser#tokenize`
Make verbatims text or newline only, and simplify `build_verbatim`.

https://github.com/ruby/rdoc/commit/41ceae93b3
2022-11-27 17:24:38 +00:00
Nobuyoshi Nakada 511864d1a7 [ruby/rdoc] Refine regexp usages and reduce substring allocations
https://github.com/ruby/rdoc/commit/a976fb9d39
2022-11-27 16:35:08 +00:00
Nobuyoshi Nakada 586e18b946 [ruby/rdoc] Escape HYPERLINKs
https://github.com/ruby/rdoc/commit/ac35485be6
2022-10-07 12:09:22 +09:00
Nobuyoshi Nakada 9e3ab9da7f [ruby/rdoc] Escape RDOCLINKs
https://hackerone.com/reports/1187156

https://github.com/ruby/rdoc/commit/7cecf1efae
2022-10-07 12:09:21 +09:00
Nobuyoshi Nakada deaa656608 [ruby/rdoc] Escape TIDYLINKs
https://hackerone.com/reports/1187156

https://github.com/ruby/rdoc/commit/1ad2dd3ca2
2022-10-07 12:09:20 +09:00
Nobuyoshi Nakada 75a53f6be0 [ruby/rdoc] Allow RDoc markups in table cells
https://github.com/ruby/rdoc/commit/b16d3f1727
2022-10-06 18:24:44 +09:00
Nobuyoshi Nakada af265d73fb [ruby/rdoc] Fix blockquote with word in verbatim
https://github.com/ruby/rdoc/commit/75eee668a5
2022-07-30 11:04:11 +09:00
Nobuyoshi Nakada f29f1d22c3 [ruby/rdoc] Fix formatting blockquote in verbatim
Reported at https://github.com/ruby/rdoc/pull/907#discussion_r932505816

https://github.com/ruby/rdoc/commit/86384ac7f9
2022-07-29 09:21:33 +09:00
Nobuyoshi Nakada 5397dd2e76 [ruby/rdoc] Apply matching word pairs to underscore-methods
Protected characters with `PROTECT_ATTR` should not have special
roles.

https://github.com/ruby/rdoc/commit/c318af0ea2
2022-04-14 16:37:14 +09:00
Peter Zhu aaac279de0 [ruby/rdoc] Only parse valid URLs
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
2022-04-13 22:25:33 +09:00
Yusuke Endoh ae8a8b184e [ruby/rdoc] Prefer `require 'cgi/util'` instead of `require 'cgi'`
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
2022-02-22 17:08:52 +09:00
Nobuyoshi Nakada 8013250136 [ruby/rdoc] Simplify attribute exclusiveness conditions
https://github.com/ruby/rdoc/commit/45e33c4b85
2022-02-09 22:22:46 +09:00
Mike Dalessio 7aec65add4 [ruby/rdoc] feat: add support for :category: on C functions
https://github.com/ruby/rdoc/commit/45c92005fe
2021-10-16 01:39:36 +09:00
Nobuyoshi Nakada 3dacc14fd3 [ruby/rdoc] Fix links without paths
https://github.com/ruby/rdoc/commit/424bd5db4d
2021-07-05 11:34:37 +09:00
Nobuyoshi Nakada f88a9097a4 [ruby/rdoc] Fix for explicit http link
https://github.com/ruby/rdoc/commit/caf234665c
2021-07-05 11:34:35 +09:00
Nobuyoshi Nakada 7c8aa0a5d2 [ruby/rdoc] Allow a label in a link to another document text
https://github.com/ruby/rdoc/commit/85bb2d33bb
2021-07-05 11:34:33 +09:00
Nobuyoshi Nakada 64b991b0cd [ruby/rdoc] Links to document texts without "rdoc-ref:" prefix
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
2021-04-03 01:22:09 +09:00
aycabta 61e1cf23ac [ruby/rdoc] Treat emphasis tags as excluding other notations
And exclusive notations don't exclude other exclusive notations.

https://github.com/ruby/rdoc/commit/b8baa9a435
2021-04-03 01:21:50 +09:00
aycabta e84d275fe6 [ruby/rdoc] Treat other tags as word boundaries
https://github.com/ruby/rdoc/commit/8222f85a17
2021-04-03 01:21:38 +09:00
aycabta 54aa11efa8 [ruby/rdoc] Disable other notations in <code> tags
https://github.com/ruby/rdoc/commit/0cd3b55210
2021-04-03 01:21:12 +09:00
Nobuyoshi Nakada 3651f678a7 [ruby/rdoc] Support GFM table
https://github.com/ruby/rdoc/commit/9dc933df16
2021-03-16 15:47:27 +09:00
Nobuyoshi Nakada 3198e7abd7
Separate `send` into `public_send` and `__send__` 2020-10-27 16:12:45 +09:00
hyrious 02951a45f0 [ruby/rdoc] Create link to unary operator methods correctly
https://github.com/ruby/rdoc/commit/54500cf12a
2020-07-22 02:35:12 +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.

https://github.com/ruby/rdoc/commit/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

https://github.com/ruby/rdoc/commit/b120d087f6
2020-05-24 23:47:24 +09:00
Nobuyoshi Nakada 2b7409a2f2
Specify explicit separator not to be affected by $; 2020-03-08 17:38:37 +09:00
Yusuke Endoh bc1e2271af lib/rdoc/markup/parser.rb: remove a unused variable initialization 2019-08-19 10:07:05 +09:00
Hiroshi SHIBATA 79fe84edf5 Removed test_case files from lib directory. 2019-08-17 20:20:04 +09:00
Hiroshi SHIBATA e87e10e5e7 Use test/unit instead of test-unit. Because test-unit is only provided standalone gem. 2019-08-16 06:07:11 +09:00
Nobuyoshi Nakada 1a5304228a Use test-unit instead of minitest
Minitest 6 will err `assert_equal` with `nil`.
https://github.com/seattlerb/minitest/issues/779
2019-08-16 06:07:11 +09:00
aycabta 64f9f512c5 Treat linking to Markdown label correctly 2019-08-16 06:02:45 +09:00
Yusuke Endoh 0a0760aa63 Refactor and improve performance of RDoc::Markup::Parser
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.
2019-08-16 06:02:45 +09:00
Maxime Lapointe b67b07bd5b Fix links to headings
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.
2019-07-14 17:46:16 +09:00
aycabta 18911e99d2 Merge RDoc 6.1.0.beta3 from upstream
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-08 17:39:52 +00:00
mame 03cde6c805 lib/rdoc/markup/: Remove wrong call to `=~` against Array
`@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
2018-11-26 05:32:50 +00:00
nobu b9ca9169ba Mark up code inside link text as <code>
Merged https://github.com/ruby/rdoc/pull/660

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-29 06:23:21 +00:00
aycabta 1b43644edc Merge rdoc-6.1.0.beta2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-17 06:28:20 +00:00
hsbt 95e213d354 Merge rdoc-6.1.0.beta1.
* https://github.com/ruby/rdoc/compare/v6.0.4...v6.1.0.beta1

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 01:30:18 +00:00
hsbt 98c7058bf7 Merge RDoc 6.0.3 from upstream.
It fixed the several bugs that was found after RDoc 6 releasing.

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-26 05:56:26 +00:00
hsbt 5551871086 Merge rdoc-6.0.0.beta4 from upstream.
It version applied `frozen_string_literal: true`

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-27 10:45:24 +00:00
hsbt db6c51ec4f Merge rdoc-6.0.0.beta3.
* It version introduced did you mean? feature for ri command:
    https://github.com/ruby/rdoc/pull/533
  * Removed obbsoleted ruby_token.rbb.
    [Bug #13990][ruby-core:83180]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-10 02:01:00 +00:00
hsbt 214a7f8d49 Merge rdoc-6.0.0.beta2 from upstream.
* This version changed lexer used Ripper from lexer based IRB.
    see details: https://github.com/ruby/rdoc/pull/512

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12 03:42:54 +00:00
nobu 84012757a7 rdoc: suppress warnings in eval
* lib/rdoc/markup/to_html.rb (RDoc::Markup::ToHtml): the argument
  text may contain warnings, which are useless to check if
  parseable.  merge rdoc/rdoc#440.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-06 02:35:48 +00:00
hsbt cdc527db34 * lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0
Release note: b825775647/History.rdoc (500--2016-11-05)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-05 09:18:10 +00:00
hsbt ba6ae341ba * lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0.beta2
Fixed ri parse defect with left-hand matched classes.
  https://github.com/rdoc/rdoc/pull/420

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-07 22:23:38 +00:00
hsbt 46e5c5622f * lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0.beta1
This version is mostly same as r56072. It contains to remove code
  for Ruby 1.8

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-07 02:51:12 +00:00
naruse 3e92b635fb Add frozen_string_literal: false for all files
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
drbrain 4260aa1dc3 * lib/rdoc: Update to RDoc 4.2.0.
* test/rdoc:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-07 01:22:37 +00:00
hsbt 80325bab52 * lib/rdoc.rb, lib/rdoc, test/rdoc: Update to RDoc 4.2.0.alpha(21b241a)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11 01:03:22 +00:00