If a @end* (@end* referring to @endnote, @endbug, or @endtodo) appears at the end of a markdown file parsed by Ford, then this happens:
Traceback (most recent call last):
File "/home/mcocdawc/.local/bin/ford", line 8, in <module>
sys.exit(run())
File "/home/mcocdawc/code/ford/ford/__init__.py", line 491, in run
main(proj_data, proj_docs)
File "/home/mcocdawc/code/ford/ford/__init__.py", line 445, in main
proj_docs = md.reset().convert(proj_docs)
File "/home/mcocdawc/code/ford/ford/_markdown.py", line 119, in convert
return super().convert(source)
File "/home/mcocdawc/.local/lib/python3.8/site-packages/markdown/core.py", line 261, in convert
self.lines = prep.run(self.lines)
File "/home/mcocdawc/code/ford/ford/md_admonition.py", line 149, in run
return self._process_admonitions(admonitions, lines)
File "/home/mcocdawc/code/ford/ford/md_admonition.py", line 230, in _process_admonitions
if lines[idx] != "":
IndexError: list index out of range
It is easily fixed by adding an empty line afterwards.
The same is true for such constructs at the end of a docstring, i.e.
real elemental function add(x, y)
!! Adds two real numbers `x` and `y`.
!!
!! @note
!! Because of machine precision floating point numbers, this operation is not always associative.
!! @endnote
real, intent(in) :: x, y
add = x + y
end function
Leads to an error, while
[...]
!! @note
!! Because of machine precision floating point numbers, this operation is not always associative.
!! @endnote
!!
[...]
works.
Can be easily reproduced in the example of the repository.
If a
@end*
(@end*
referring to@endnote
,@endbug
, or@endtodo
) appears at the end of a markdown file parsed byFord
, then this happens:It is easily fixed by adding an empty line afterwards.
The same is true for such constructs at the end of a docstring, i.e.
Leads to an error, while
works.
Can be easily reproduced in the example of the repository.