Closed jonathanhefner closed 6 months ago
This is great. I've tried to get this upstreamed in RDoc without much success. https://github.com/ruby/rdoc/pull/1016 Maybe this change helps.
I've tried to get this upstreamed in RDoc without much success. ruby/rdoc#1016 Maybe this change helps.
Yes, I don't understand why that PR was rejected. There are several things which I think should be fixed upstream in RDoc. However, the friction seems to be quite high, and I don't want to block improvements to SDoc. Perhaps SDoc can serve as a good example though.
This adds a permalink next to each constant's name, similar to methods. This also adds a "Constants" navigation section in the sidebar, similar to the "Methods" navigation section.
The permalinks are implemented by monkeypatching
RDoc::Constant
to provide anaref
method, just asRDoc::ClassModule
andRDoc::MethodAttr
already do.