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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| t | type(tree_t) | inout | the conversion | |
| cells | type(string_t) | in | dimension(:) | the cells |
| tag | character(len=*) | in |
| |
| align | type(string_t) | in | dimension(:) | the attributes of each column |
| options | type(markdown_options_t) | in | what rendering depends on | |
| out | type(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