-
Notifications
You must be signed in to change notification settings - Fork 438
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
Fix section comments (in darkfish) #936
base: master
Are you sure you want to change the base?
Conversation
Sorry, I can't get your point.
|
My apologies. I was in a rush when I posted this. I'm talking about the text that comes after As far as I can tell, rdoc always saves that text onto From https://docs.ruby-lang.org/en/3.1/RDoc/Markup.html#class-RDoc::Markup-label-Sections, I'm referring to this:
# ----------------------------------------
# :section: My Section
# This is the section that I wrote.
# See it glisten in the noon-day sun.
# ---------------------------------------- |
and I also want to repeat: this PR in its current form shouldn't be accepted. It has no tests, and I was in a hurry, so I submitted it immediately after I had figured out the problem. I wanted feedback about how I (or someone else) should fix it "properly". Thanks! |
n.b. the section description is also mentioned in doc/rdoc/markup_reference.rb:
(emphasis is mine) Unfortunately, although the descriptive text makes this claim, the MarkupReference class never demonstrates it... because it can't until the bug is fixed. 🙂 |
fe48b40
to
783a664
Compare
I've converted this to a "Draft" because I don't think it should be accepted as-is. I used a monkey-patch for the same affect here: https://github.com/ruby/net-imap/blob/d59fb98b8c29e77fdd5935aae35a7e3d151c562d/rakelib/rdoc.rake#L15-L24 and https://github.com/ruby/net-imap/blob/d59fb98b8c29e77fdd5935aae35a7e3d151c562d/rakelib/rdoc.rake#L54-L56 And here is a demonstration of section comments output: https://nevans.github.io/net-imap/Net/IMAP.html#Basic+Mailbox+Attributes |
783a664
to
4b37646
Compare
This is almost certainly the wrong way to do this. But the lack of section comments has been bugging me for years, and this was my first attempt at figuring out why it is broken. Maybe someone else can fix it The Right Way, or give me some advice on how to do so myself...
4b37646
to
3c2ad0a
Compare
The lack of section comments has been annoying me for couple of years, and this was my first attempt at figuring out why it is broken. This fixes it! 🎉
n.b. this PR in its current form probably shouldn't be accepted: no tests, and the way I fixed it feels like a hack. But I don't grok the codebase well enough to know what I'm meant to be doing instead. I was basically just stumbling my way through the code with pry and debugger and
$stderr.puts
until I got something that worked!Hopefully this helps someone else fix it the right way. Or let me know what I should do to make this PR acceptable. Thanks!