fdoc

subroutinerender_entityprivate

subroutine render_entity(p, options, id)

Render the documentation and summary of entity id.

Arguments

NameTypeIntentAttributesDescription
ptype(project_t)inouttarget

the project

optionstype(markdown_options_t)in

the Markdown options

idintegerin

the entity

Calls

Source

Show the code
subroutine render_entity(p, options, id)
    type(project_t), intent(inout), target :: p         !! the project
    type(markdown_options_t), intent(in) :: options     !! the Markdown options
    integer, intent(in) :: id                           !! the entity
    type(string_t), allocatable :: lines(:)
    integer :: k

    if (.not. allocated(p%list%box(id)%e%doc)) return
    if (p%list%box(id)%e%kind == E_NONE) return
    associate (e => p%list%box(id)%e)
        lines = e%doc
        call dedent(lines)
        call render_text(p, options, id, '../', join(lines, achar(10)), e%html)
        do k = 1, size(e%meta)
            if (e%meta(k)%key /= 'summary') cycle
            call render_text(p, options, id, '../', join(split_words(join(e%meta(k)%values, ' ')), ' '), e%summary)
        end do
        if (.not. allocated(e%summary)) call first_paragraph(e%html, e%summary)
    end associate
end subroutine render_entity

Graphs

Calls

Called by