You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rdoc currently removes shebangs and ruby magic comments from rendered documetantion.
But other tools like sorbet and rbs-inline provide their own comments like # typed: true or rbs_inline: enabled which aren't excluded. If I have a file like this:
Then for each file, you get one rbs_inline comment on the top-level namespace. I feel like either rdoc should
ignore any magic-style comment, regardless of if it is "official" or not
Not attach comments where there is whitespace before the top-level. I guess this is not feasable for backwards compat since rdoc itself makes heavy use of that style.
This can be worked around by inserting #-- before the magic comments but I don't think I should need to care about this at all.
Reacted by Benoit Daloze, Gabriele Renzi and Robert Mosolgo
Activity
nobu commentedon Mar 4, 2026
Another workaround is to insert a document separated by blank lines from those magic comments, even if it's empty.
Hide Sorbet sigils from RDoc output