I was just playing around with sphinx-python (version 1.0.1) and noticed that the header and inline comments are not extracted when the recursive keyword precedes a subroutine.
Example:
With this Fortran Code:
recursive SUBROUTINE add_tree_node(current, value)
! Add new tree_node into the tree.
TYPE (tree_node), pointer :: current ! pointer to current tree
REAL :: value ! value of new tree node
IF (.NOT.associated(current)) THEN
allocate(current)
current%value = value
ELSEIF (value < current%value) THEN
CALL add_tree_node(current%left, value)
ELSE
CALL add_tree_node(current%right, value)
END IF
END SUBROUTINE add_tree_node
and sphinx-fortran directive: .. f:autosrcfile:: tree_sort_module.f90
Once I remove the recursive keyword, the comments get properly included in the docs:
subroutine tree_sort_module/add_tree_node(current, value)
Add new tree_node into the tree.
Parameters:
* **current*** [**tree_node**,**pointer**]* :: pointer to
current tree
* **value*** [**real**]* :: value of new tree node
Called from:
"add_tree_node()", "tree_sort"
Call to:
"add_tree_node()"
I was just playing around with sphinx-python (version 1.0.1) and noticed that the header and inline comments are not extracted when the
recursive
keyword precedes a subroutine.Example:
With this Fortran Code:
and sphinx-fortran directive:
.. f:autosrcfile:: tree_sort_module.f90
I get this after generating with
make text
:Once I remove the
recursive
keyword, the comments get properly included in the docs: