#940: Render header inside thead element if table has header (#941)

This commit is contained in:
Gaurang Kher
2020-07-29 14:36:33 -05:00
committed by GitHub
parent 7a4ad2ed95
commit f107557463
2 changed files with 7 additions and 0 deletions

View File

@ -797,14 +797,18 @@ function! s:close_tag_table(table, ldest, header_ids) abort
endif
endfor
if head > 0
call add(ldest, '<thead>')
for row in table[1 : head-1]
if !empty(filter(row, '!empty(v:val)'))
call s:close_tag_row(row, 1, ldest, a:header_ids)
endif
endfor
call add(ldest, '</thead>')
call add(ldest, '<tbody>')
for row in table[head+1 :]
call s:close_tag_row(row, 0, ldest, a:header_ids)
endfor
call add(ldest, '</tbody>')
else
for row in table[1 :]
call s:close_tag_row(row, 0, ldest, a:header_ids)