Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only let browser search through source code until it's expanded #1181

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

Earlopain
Copy link
Contributor

Something that's been bothering me is that while the source code is not visible by default, the browser still jump to it when searching. Adding the visible property prevents this.

Test it out yourself:

  • bundle exec rdoc
  • open _site/RDoc.html
  • Search for NameError

Before, you will get a match from load_yaml source code, after you only get the match when that methods source code is expanded:
image
image

Something that's been bothering me is that while the source code is
not visible by default, the browser still jump to it when searching.
Adding the `visible` property prevents this.

Test it out yourself:
* `bundle exec rdoc`
* open `_site/index.html`
* Search for `NameError`

Before, you will get a match from `load_yaml` source code, after
you only get the match when that methods source code is expanded.
Copy link
Member

@st0012 st0012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a great improvement, thank you 👍

@st0012 st0012 added the bug label Sep 30, 2024
@st0012 st0012 merged commit 003126c into ruby:master Sep 30, 2024
26 checks passed
matzbot pushed a commit to ruby/ruby that referenced this pull request Sep 30, 2024
expanded
(ruby/rdoc#1181)

Something that's been bothering me is that while the source code is
not visible by default, the browser still jump to it when searching.
Adding the `visible` property prevents this.

Test it out yourself:
* `bundle exec rdoc`
* open `_site/index.html`
* Search for `NameError`

Before, you will get a match from `load_yaml` source code, after
you only get the match when that methods source code is expanded.

ruby/rdoc@003126cc23
@Earlopain Earlopain deleted the dont-search-until-expanded branch September 30, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants