subroutinecollect_abbreviations
subroutine collect_abbreviations(p, options)
Make the abbreviations defined in any documentation apply everywhere, as they do in FORD.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| p | type(project_t) | in | the project | |
| options | type(markdown_options_t) | inout | the options |
Calls
Source
Show the code
subroutine collect_abbreviations(p, options)
type(project_t), intent(in) :: p !! the project
type(markdown_options_t), intent(inout) :: options !! the options
type(map_entry_t), allocatable :: found(:)
integer :: k, j, at
allocate (found(0))
do k = 1, p%list%n
if (.not. allocated(p%list%box(k)%e%doc)) cycle
associate (doc => p%list%box(k)%e%doc)
do j = 1, size(doc)
if (.not. starts_with(strip(doc(j)%s), '*[')) cycle
at = index(doc(j)%s, ']:')
if (at == 0) cycle
found = [found, map_entry_t(doc(j)%s(index(doc(j)%s, '*[') + 2:at - 1), strip(doc(j)%s(at + 2:)))]
end do
end associate
end do
if (size(found) > 0) options%abbreviations = found
end subroutine collect_abbreviations