fdoc

subroutinetable_rowrecursiveprivate

recursive subroutine table_row(t, cells, tag, align, options, out)

Write a table row with exactly as many cells as align has.

Arguments

NameTypeIntentAttributesDescription
ttype(tree_t)inout

the conversion

cellstype(string_t)indimension(:)

the cells

tagcharacter(len=*)in

th or td

aligntype(string_t)indimension(:)

the attributes of each column

optionstype(markdown_options_t)in

what rendering depends on

outtype(buffer_t)inout

the HTML

Calls

Source

Show the code
recursive subroutine table_row(t, cells, tag, align, options, out)
    type(tree_t), intent(inout) :: t                !! the conversion
    type(string_t), intent(in) :: cells(:)          !! the cells
    character(len=*), intent(in) :: tag             !! `th` or `td`
    type(string_t), intent(in) :: align(:)          !! the attributes of each column
    type(markdown_options_t), intent(in) :: options !! what rendering depends on
    type(buffer_t), intent(inout) :: out            !! the HTML
    integer :: c

    call add(out, '<tr>'//NL)
    do c = 1, size(align)
        call add(out, '<'//tag//align(c)%s//'>')
        if (c <= size(cells)) call inline(t, cells(c)%s, options, out, 0)
        call add(out, '</'//tag//'>'//NL)
    end do
    call add(out, '</tr>'//NL)
end subroutine table_row

Graphs

Calls

Called by