-
Notifications
You must be signed in to change notification settings - Fork 439
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
Enable cross reference in code #1240
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few questions/concerns:
- Given the place this changes are made, I think it'd be applied to markdown's too?
- Will these additional linking attempts cause significant slowdown when generating docs for large projects, like
ruby/ruby
- We need to make sure when a code block doesn't link, it's still rendered as code block.
lib/rdoc/markup/to_html_crossref.rb
Outdated
case item | ||
when RDoc::Markup::AttrChanger then | ||
# Make "+Class#method+" a cross reference | ||
if respond_to?(:cross_reference) and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this ever be false
?
Yes, as mentioned in the description, the motivation is to mark up in markdown, but not only for it.
There was no significant difference, 27sec -> 27sec on my machine.
Fixed. |
Some people like to mark up method names in MarkDown style block quotes, like this: ruby/ruby#12333. Currently, no links are created in the code in the RDoc, but such words most likely refer to methods. This PR makes a word a code cross-reference if the whole word can be resolved as a reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(ruby/rdoc#1240) Some people like to mark up method names in MarkDown style block quotes, like this: #12333. Currently, no links are created in the code in the RDoc, but such words most likely refer to methods. This PR makes a word a code cross-reference if the whole word can be resolved as a reference. ruby/rdoc@7d7efb0709
Some people like to mark up method names in MarkDown style block quotes, like this: ruby/ruby#12333.
Currently, no links are created in the code in the RDoc, but such words most likely refer to methods.
This PR makes a word a code cross-reference if the whole word can be resolved as a reference.