rails / sdoc

Standalone sdoc generator
http://api.rubyonrails.org/
Other
823 stars 131 forks source link

Redesign "Constants" section #356

Closed jonathanhefner closed 6 months ago

jonathanhefner commented 6 months ago

This changes the appearance of the "Constants" section to match the "Methods" sections.

Before After
before after
p8 commented 6 months ago

This looks nice! Code indentation seems to be ignored:

image

https://deploy-preview-356--sdoc.netlify.app/classes/activerecord

jonathanhefner commented 6 months ago

Code indentation seems to be ignored:

Unfortunately, that is value that RDoc::Constant#value returns. I believe it is due to the way parse_constant_body is implemented (specifically, due to the get_tkread_clean(/^[ \t]+/, '') calls). I'm not sure whether the end result is intentional or accidental.