ctran / annotate_models

Annotate Rails classes with schema and routes info
Other
4.41k stars 598 forks source link

Reformat Column comments #1011

Open Z2Flow opened 7 months ago

Z2Flow commented 7 months ago

This stems from reverse-engineering a PostgreSQL database… Add the ability to move column comments to the next line, and indented 'n' spaces. Also soft-wrap to column 'm' (default 80), and interpret newline characters (\n).

Currently columns with long comments cause the page width to extend to the end of the comment making it difficult to access the datatype as it overflows the window.

E.g. current formatting:

# assembly_failures(The list of causes of failure for an assembly.\n This is a template field copied to the Test when it is created.\n This array creates a list of checkboxes in the form. :jsonb

Proposed formatting:

#  assembly_failures                                       :jsonb
#       The list of causes of failure for an assembly.
#       This is a template field copied to the Test when it is created.
#       This array creates a list of checkboxes in the form.

Version

mvastola commented 5 months ago

Yes, please! Was about to submit a PR to simply add a space between the field name and the (, but this is way better.