summaryrefslogtreecommitdiff
path: root/lib/rdoc/markup
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/rdoc] [DOC] stop documenting fallback `MatchData#match_length`Nobuyoshi Nakada2023-05-021-11/+11
| | | | | | Also empty document of `Object`. https://github.com/ruby/rdoc/commit/ce32a3102b
* [ruby/rdoc] Revert "Refactor `RDoc::Markup::Parser#tokenize`"Nobuyoshi Nakada2022-11-271-108/+106
| | | | | | This reverts commit https://github.com/ruby/rdoc/commit/41ceae93b3bc. https://github.com/ruby/rdoc/commit/5d2c47e8b8
* [ruby/rdoc] Refactor `RDoc::Markup::Parser#tokenize`Nobuyoshi Nakada2022-11-271-106/+108
| | | | | | Make verbatims text or newline only, and simplify `build_verbatim`. https://github.com/ruby/rdoc/commit/41ceae93b3
* [ruby/rdoc] Refine regexp usages and reduce substring allocationsNobuyoshi Nakada2022-11-272-30/+26
| | | | https://github.com/ruby/rdoc/commit/a976fb9d39
* [ruby/rdoc] Escape HYPERLINKsNobuyoshi Nakada2022-10-071-1/+1
| | | | https://github.com/ruby/rdoc/commit/ac35485be6
* [ruby/rdoc] Escape RDOCLINKsNobuyoshi Nakada2022-10-071-7/+5
| | | | | | https://hackerone.com/reports/1187156 https://github.com/ruby/rdoc/commit/7cecf1efae
* [ruby/rdoc] Escape TIDYLINKsNobuyoshi Nakada2022-10-071-2/+6
| | | | | | https://hackerone.com/reports/1187156 https://github.com/ruby/rdoc/commit/1ad2dd3ca2
* [ruby/rdoc] Allow RDoc markups in table cellsNobuyoshi Nakada2022-10-061-2/+2
| | | | https://github.com/ruby/rdoc/commit/b16d3f1727
* [ruby/rdoc] Fix blockquote with word in verbatimNobuyoshi Nakada2022-07-301-6/+10
| | | | https://github.com/ruby/rdoc/commit/75eee668a5
* [ruby/rdoc] Fix formatting blockquote in verbatimNobuyoshi Nakada2022-07-291-0/+2
| | | | | | Reported at https://github.com/ruby/rdoc/pull/907#discussion_r932505816 https://github.com/ruby/rdoc/commit/86384ac7f9
* [ruby/rdoc] Apply matching word pairs to underscore-methodsNobuyoshi Nakada2022-04-141-2/+3
| | | | | | | Protected characters with `PROTECT_ATTR` should not have special roles. https://github.com/ruby/rdoc/commit/c318af0ea2
* [ruby/rdoc] Only parse valid URLsPeter Zhu2022-04-131-1/+3
| | | | | | | | | 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
* [ruby/rdoc] Prefer `require 'cgi/util'` instead of `require 'cgi'`Yusuke Endoh2022-02-222-2/+2
| | | | | | | 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
* [ruby/rdoc] Simplify attribute exclusiveness conditionsNobuyoshi Nakada2022-02-091-24/+4
| | | | https://github.com/ruby/rdoc/commit/45e33c4b85
* [ruby/rdoc] feat: add support for :category: on C functionsMike Dalessio2021-10-161-0/+2
| | | | https://github.com/ruby/rdoc/commit/45c92005fe
* [ruby/rdoc] Fix links without pathsNobuyoshi Nakada2021-07-051-1/+1
| | | | https://github.com/ruby/rdoc/commit/424bd5db4d
* [ruby/rdoc] Fix for explicit http linkNobuyoshi Nakada2021-07-051-2/+2
| | | | https://github.com/ruby/rdoc/commit/caf234665c
* [ruby/rdoc] Allow a label in a link to another document textNobuyoshi Nakada2021-07-051-2/+2
| | | | https://github.com/ruby/rdoc/commit/85bb2d33bb
* [ruby/rdoc] Links to document texts without "rdoc-ref:" prefixNobuyoshi Nakada2021-04-031-0/+4
| | | | | | | | | | | | | | 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
* [ruby/rdoc] Treat emphasis tags as excluding other notationsaycabta2021-04-032-6/+6
| | | | | | And exclusive notations don't exclude other exclusive notations. https://github.com/ruby/rdoc/commit/b8baa9a435
* [ruby/rdoc] Treat other tags as word boundariesaycabta2021-04-031-4/+13
| | | | https://github.com/ruby/rdoc/commit/8222f85a17
* [ruby/rdoc] Disable other notations in <code> tagsaycabta2021-04-032-25/+87
| | | | https://github.com/ruby/rdoc/commit/0cd3b55210
* [ruby/rdoc] Support GFM tableNobuyoshi Nakada2021-03-165-0/+100
| | | | https://github.com/ruby/rdoc/commit/9dc933df16
* Separate `send` into `public_send` and `__send__`Nobuyoshi Nakada2020-10-271-1/+1
|
* [ruby/rdoc] Create link to unary operator methods correctlyhyrious2020-07-221-2/+2
| | | | https://github.com/ruby/rdoc/commit/54500cf12a
* [ruby/rdoc] Process crossref before tidylinkaycabta2020-05-242-8/+29
| | | | | | | 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
* [ruby/rdoc] Escape method names in HTMLNate Matykiewicz2020-05-241-1/+1
| | | | | | | | | | | | | | | 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
* Specify explicit separator not to be affected by $;Nobuyoshi Nakada2020-03-081-1/+1
|
* lib/rdoc/markup/parser.rb: remove a unused variable initializationYusuke Endoh2019-08-191-1/+0
|
* Removed test_case files from lib directory.Hiroshi SHIBATA2019-08-172-879/+0
|
* Use test/unit instead of test-unit. Because test-unit is only provided ↵Hiroshi SHIBATA2019-08-161-1/+1
| | | | standalone gem.
* Use test-unit instead of minitestNobuyoshi Nakada2019-08-161-1/+1
| | | | | Minitest 6 will err `assert_equal` with `nil`. https://github.com/seattlerb/minitest/issues/779
* Treat linking to Markdown label correctlyaycabta2019-08-161-1/+5
|
* Refactor and improve performance of RDoc::Markup::ParserYusuke Endoh2019-08-161-42/+59
| | | | | | | | | | | | | | | | 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.
* Fix links to headingsMaxime Lapointe2019-07-141-1/+1
| | | | | 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.
* Merge RDoc 6.1.0.beta3 from upstreamaycabta2018-12-081-3/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/rdoc/markup/: Remove wrong call to `=~` against Arraymame2018-11-262-2/+2
| | | | | | | | | | | | `@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
* Mark up code inside link text as <code>nobu2018-10-291-7/+15
| | | | | | 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
* Merge rdoc-6.1.0.beta2aycabta2018-10-1715-162/+159
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge rdoc-6.1.0.beta1.hsbt2018-08-272-4/+1
| | | | | | * 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
* Merge RDoc 6.0.3 from upstream.hsbt2018-03-261-0/+1
| | | | | | | | 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
* Merge rdoc-6.0.0.beta4 from upstream.hsbt2017-11-2736-74/+52
| | | | | | It version applied `frozen_string_literal: true` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge rdoc-6.0.0.beta3.hsbt2017-10-101-1/+1
| | | | | | | | | * 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
* Merge rdoc-6.0.0.beta2 from upstream.hsbt2017-09-121-3/+5
| | | | | | | * 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
* rdoc: suppress warnings in evalnobu2017-02-061-0/+3
| | | | | | | | * 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
* * lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0hsbt2016-11-052-6/+1
| | | | | | Release note: https://github.com/rdoc/rdoc/blob/b825775647f62c5b525e9780a28ff2fbb1d5bf6f/History.rdoc#500--2016-11-05 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0.beta2hsbt2016-09-071-17/+1
| | | | | | | 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
* * lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0.beta1hsbt2016-09-071-4/+0
| | | | | | | 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
* Add frozen_string_literal: false for all filesnaruse2015-12-1636-0/+36
| | | | | | 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
* * lib/rdoc: Update to RDoc 4.2.0.drbrain2014-12-072-5/+6
| | | | | | | * test/rdoc: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e