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

Allow projects to disable auto-linking on certain words #1254

Closed
st0012 opened this issue Dec 25, 2024 · 4 comments · Fixed by #1259 · May be fixed by #1264
Closed

Allow projects to disable auto-linking on certain words #1254

st0012 opened this issue Dec 25, 2024 · 4 comments · Fixed by #1259 · May be fixed by #1264
Assignees

Comments

@st0012
Copy link
Member

st0012 commented Dec 25, 2024

ruby/ruby#12451 introduced the top-level Ruby constant, which means that every Ruby in https://docs.ruby-lang.org/en/master/index.html are now linked to it:

Screenshot 2024-12-25 at 12 00 39

Instead of escaping them one by one (there are more than a thousand occurrences in ruby/ruby), RDoc should allow projects to list a set of words that should not be auto-linked.

@ParadoxV5
Copy link

ParadoxV5 commented Dec 26, 2024

Set is another common word.


I wonder, what was the decision to autolink constants in the first place?

@st0012
Copy link
Member Author

st0012 commented Dec 26, 2024

Set is another common word.

Good call.

I wonder, what was the decision to autolink constants in the first place?

I don't know as I wasn't the maintainer back then. But IMO for ruby/ruby, the biggest project using RDoc, this decision makes sense as it saves a lot of linking syntax when writing core component docs.

@skipkayhil
Copy link
Contributor

Rails would definitely find this useful as well, we currently do the escaping manually 🙈

https://github.com/rails/rails/blob/c31cc0b2e451b9271bdfedc68884e8ae38a7c0fb/actionview/lib/action_view/base.rb#L102-L103

@st0012
Copy link
Member Author

st0012 commented Dec 28, 2024

PR: #1259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants