aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/generator
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/rdoc] Fix some typos (https://github.com/ruby/rdoc/pull/1129)Yudai Takada2024-07-011-1/+1
| | | | | | | | | | | | * constist ==> consist * Tidyness ==> Tidiness * Currentry ==> Currently * valus ==> values https://github.com/ruby/rdoc/commit/8412705721
* [ruby/rdoc] [DOC] nodoc for probably internal methodsNobuyoshi Nakada2023-12-161-0/+1
| | | | https://github.com/ruby/rdoc/commit/f7dd147a8c
* [ruby/rdoc] [DOC] Slightly decorate `em` and `strong`Nobuyoshi Nakada2023-11-271-0/+11
| | | | https://github.com/ruby/rdoc/commit/2161157205
* [ruby/rdoc] Remove code for versions older than Ruby 2.6Nobuyoshi Nakada2023-09-051-5/+1
| | | | https://github.com/ruby/rdoc/commit/0d10f460eb
* [ruby/rdoc] Omit descriptions and parameter lists for methods defined in C ↵Jeremy Evans2023-09-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* [ruby/rdoc] [DOC] Improve CSS for "toggle source" hovering over one more ↵Masafumi Koba2023-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | method signatures This commit improves the behavior of showing the "toggle source" element on mouseover. For example, when a method has one more signatures by using `:call-seq:`, ```ruby # :call-seq: # foo {|element| ... } -> self # foo -> new_enumeration def foo end ``` The current CSS doesn't show "toggle source" even when hovering the second signature `foo -> new_enumeration`. But this change will show "toggle source" always when hovering over any signature. For details about the `.method-header` element, see `lib/rdoc/generator/template/darkfish/class.rhtml`: https://github.com/ruby/rdoc/blob/0e060c69f51ec4a877e5cde69b31d47eaeb2a2b9/lib/rdoc/generator/template/darkfish/class.rhtml#L101-L124 For example, see https://docs.ruby-lang.org/en/3.2/Array.html#method-i-delete
* [ruby/rdoc] [DOC] Fix to use KeyboardEvent.key over keyCodegemmaro2023-07-052-11/+11
| | | | https://github.com/ruby/rdoc/commit/663edc807c
* [ruby/rdoc] Add keydown event listener to focus on search fieldgemmaro2023-07-052-1/+14
| | | | https://github.com/ruby/rdoc/commit/db62e47df2
* [ruby/rdoc] Use flat_map for better performancePetrik2023-06-143-5/+5
| | | | https://github.com/ruby/rdoc/commit/76192a280d
* [ruby/rdoc] Auto-correct trailing new linesVinicius Stock2023-06-032-2/+0
| | | | https://github.com/ruby/rdoc/commit/4b68c0728a
* [ruby/rdoc] Improve `<summary>` CSS on sidebarMasafumi Koba2023-05-261-7/+10
| | | | | | | | | | - Use a smaller font size for the toggle symbol. (Currently, it seems a little too large) - Use the child combinator (`>`) to unify selectors. - Use `margin-left` instead of whitespace within the `content` property. - Use `::` instead of outdated `:` for the pseudo-element symbol. (See https://developer.mozilla.org/en-US/docs/Web/CSS/::before) https://github.com/ruby/rdoc/commit/61ce0a7d75
* [ruby/rdoc] Improve layout CSSMasafumi Koba2023-05-261-5/+16
| | | | | | | | | | | | | - Use the `grid` property for the page layout. - https://caniuse.com/css-grid - Adjust the `<main>` margin. - Make the sidebar responsive and resizable. - https://caniuse.com/css-math-functions - https://caniuse.com/css-resize Note all modern browsers support the new CSS properties and functions used by this change. https://github.com/ruby/rdoc/commit/2db5097c41
* [ruby/rdoc] Section may not have `label`Nobuyoshi Nakada2023-05-021-2/+3
| | | | https://github.com/ruby/rdoc/commit/945f0cb3e9
* [ruby/rdoc] Fix references to nested label in table_of_contentsNobuyoshi Nakada2023-05-021-1/+1
| | | | | | Fixes https://github.com/ruby/rdoc/pull/1000 https://github.com/ruby/rdoc/commit/291e2b7e8b
* [ruby/rdoc] Darkfish: group method call-seq in div.method-headernick evans2022-11-271-20/+22
| | | | | | | | | This way, custom CSS styles can be easily applied to the entire method header at once. Otherwise, it can be tricky to make a border that goes around the entire set of method call-seq, but not the method description. https://github.com/ruby/rdoc/commit/5db4bce01e
* [ruby/rdoc] Darkfish: Nest sidebar ToC as a tree of headingsnick evans2022-11-271-4/+25
| | | | | | | 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
* [ruby/rdoc] Refine regexp usages and reduce substring allocationsNobuyoshi Nakada2022-11-271-1/+1
| | | | https://github.com/ruby/rdoc/commit/a976fb9d39
* [ruby/rdoc] Escape search resultsNobuyoshi Nakada2022-10-073-12/+12
| | | | | | https://hackerone.com/reports/1321358 https://github.com/ruby/rdoc/commit/2ebf8fd510
* [ruby/rdoc] Escape file namesNobuyoshi Nakada2022-10-072-5/+5
| | | | | | https://hackerone.com/reports/1321358 https://github.com/ruby/rdoc/commit/8c07cc4657
* [ruby/rdoc] Escape main titleNobuyoshi Nakada2022-10-071-1/+1
| | | | | | https://hackerone.com/reports/1187156 https://github.com/ruby/rdoc/commit/5dedb5741d
* [ruby/rdoc] Expand the enclosing tree of the current fileNobuyoshi Nakada2022-03-221-1/+4
| | | | https://github.com/ruby/rdoc/commit/f9f90ef2ff
* [ruby/rdoc] Fold files in the page directoryNobuyoshi Nakada2022-03-221-1/+18
| | | | https://github.com/ruby/rdoc/commit/b7b4cdab6c
* [ruby/rdoc] Allow method source code to scroll [ci skip]Nobuyoshi Nakada2022-03-201-1/+1
| | | | https://github.com/ruby/rdoc/commit/1bb0496c53
* [ruby/rdoc] Use the custom style `details summary` only in `nav-section`Nobuyoshi Nakada2022-03-201-16/+19
| | | | https://github.com/ruby/rdoc/commit/7736d3a89c
* [ruby/rdoc] Start with open when only one visible class/moduleNobuyoshi Nakada2022-03-141-8/+10
| | | | https://github.com/ruby/rdoc/commit/6bb93001db
* [ruby/rdoc] Fold class and module indexNobuyoshi Nakada2022-03-142-3/+41
| | | | https://github.com/ruby/rdoc/commit/4c7c46fcc4
* [ruby/rdoc] Scrollable sidebarMasafumi Koba2022-03-111-0/+4
| | | | | | | This change makes the sidebar scrollable via `position: sticky` and `overflow: auto`; See also <https://caniuse.com/?search=sticky> https://github.com/ruby/rdoc/commit/4d52e24840
* [ruby/rdoc] Update SourceCodePro font filesaycabta2021-10-112-0/+0
| | | | https://github.com/ruby/rdoc/commit/d3201d0d47
* [ruby/rdoc] Add tests for `--template-stylesheets` optionNobuyoshi Nakada2021-09-032-5/+3
| | | | | | | | | | Also flattens `@options.template_stylesheets` when parsing the command lines. Fixes #205 Fixes #828 too https://github.com/ruby/rdoc/commit/857002a763
* [ruby/rdoc] Add table styleNobuyoshi Nakada2021-03-161-0/+19
| | | | https://github.com/ruby/rdoc/commit/2219c5ae80
* [ruby/rdoc] Update Rdoc.css sidebar panel.Pankaj Doharey2021-03-161-0/+1
| | | | | | Updates css so the sidebar look like a panel instead of looking like chopped edges. https://github.com/ruby/rdoc/commit/b0098c6d72
* [ruby/rdoc] Prefer require_relativeMarc-Andre Lafortune2020-09-142-4/+4
|
* [ruby/rdoc] Remove empty lines from html file by using ERB trim_mode flagBenoit Tigeot2020-07-2216-134/+131
| | | | https://github.com/ruby/rdoc/commit/9e27299a46
* [ruby/rdoc] Fixed inverted CSS for note-list and label-listNobuyoshi Nakada2020-05-241-1/+1
| | | | https://github.com/ruby/rdoc/commit/a13d6439da
* [ruby/rdoc] Delegate ERB args correctlyaycabta2020-05-241-2/+2
| | | | https://github.com/ruby/rdoc/commit/82ff37a822
* [ruby/rdoc] Treat multiple Ruby methods calling the same C method as aliasesJeremy Evans2020-05-241-2/+2
| | | | | | | | | | | | | | | | | | | | 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. https://github.com/ruby/rdoc/commit/0ead78616b
* Fix keyword argument separation issues in libJeremy Evans2019-08-301-6/+6
| | | | Mostly requires adding ** in either calls or method definitions.
* Remove debug print [ci skip]Kazuhiro NISHIYAMA2019-08-281-1/+0
|
* Remove jquery.jsaycabta2019-08-281-2/+0
|
* Good bye jQueryaycabta2019-08-286-179/+92
|
* [ruby/rdoc] Fix image links in rdoc.cssMaxime Lapointe2019-07-261-5/+5
| | | | | | | | | Every image in the rdoc.css that use url has the wrong one. They end up pointing to `css/images/zoom.png` instead of `images/zoom.png`. Just open this page https://ruby.github.io/rdoc/RDoc/CodeObject.html on chrome and you can see in the console the spam of the failed GET queries. This fixes it. https://github.com/ruby/rdoc/commit/daf36f9894
* [ruby/rdoc] Update jQuery to 3.3.1aycabta2019-07-261-4/+2
| | | | https://github.com/ruby/rdoc/commit/17df871ee
* rdoc: Colorize background of code/pre [ci skip]nobu2019-03-301-0/+3
| | | | | | Borrowed the style of code/pre from bugs.ruby-lang.org. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc.css: make label-list compactnobu2019-02-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | "Labeled Lists" section in lib/rdoc/markup.rb states labeled-list will be formatted in same lines. ``` Notice that blank lines right after the label are ignored in labeled lists: [one] definition 1 [two] definition 2 produces the same output as [one] definition 1 [two] definition 2 ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge rdoc-6.1.0.beta1.hsbt2018-08-272-16/+5
| | | | | | * 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-262-4/+7
| | | | | | | | 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
* erb.rb: deprecate safe_level of ERB.newk0kubun2018-02-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, as it's in the middle of the list of 4 arguments, 3rd and 4th arguments (trim_mode, eoutvar) are changed to keyword arguments. Old ways to specify arguments are deprecated and warned now. bin/erb: deprecate -S option. We'll remove all of deprecated ones at Ruby 2.7+. enc/make_encmake.rb: stopped using deprecated interface ext/etc/mkconstants.rb: ditto ext/socket/mkconstants.rb: ditto sample/ripper/ruby2html.rb: ditto spec/ruby/library/erb/defmethod/def_erb_method_spec.rb: ditto spec/ruby/library/erb/new_spec.rb: ditto test/erb/test_erb.rb: ditto test/erb/test_erb_command.rb: ditto tool/generic_erb.rb: ditto tool/ruby_vm/helpers/dumper.rb: ditto tool/transcode-tblgen.rb: ditto lib/rdoc/erbio.rb: ditto lib/rdoc/generator/darkfish.rb: ditto [Feature #14256] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge rdoc-6.0.0.beta4 from upstream.hsbt2017-11-278-41/+68
| | | | | | 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-102-3/+3
| | | | | | | | | * 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.beta1.hsbt2017-08-291-2/+0
| | | | | | | This version fixed strange behavior of ruby code parser. We will list all of impromovement to Changelog when 6.0.0 releasing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e