Fortran-FOSS-Programmers / ford

Automatically generates FORtran Documentation from comments within the code.
https://forddocs.readthedocs.io
GNU General Public License v3.0
405 stars 131 forks source link

Inadvertent metadata autodoc comment #530

Closed patflynngithub closed 1 year ago

patflynngithub commented 1 year ago

Situation: an autodoc comment block has a metadata-looking first line that is not meant to be metadata. For example

  !> Adam: this for trying for the first comment line
  !!
  !! Detail of comment
  integer :: try_colon_comment

Even though Adam is not an official FORD metadata type, FORD strips away the first line, not displaying it with the FORTRAN element (e.g., try_colon_comment). The "Detail of comment" becomes the brief part of the autodoc comment. To get around this, I've either put a space before the colon or used a different character other than a colon.

This may be desired behavior, but, if so, it might be helpful to document this in the FORD documentation.

ZedThree commented 1 year ago

This is expected behaviour: parsing this as metadata via a markdown plugin before Ford handles it. It might be possible to restore non-Ford metadata, or even just warn about it. I'll have to have a look.

Yes, you're right that this is unfortunately not documented behaviour. That's an easier fix at least!