#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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 endif
endfor endfor
if head > 0 if head > 0
call add(ldest, '<thead>')
for row in table[1 : head-1] for row in table[1 : head-1]
if !empty(filter(row, '!empty(v:val)')) if !empty(filter(row, '!empty(v:val)'))
call s:close_tag_row(row, 1, ldest, a:header_ids) call s:close_tag_row(row, 1, ldest, a:header_ids)
endif endif
endfor endfor
call add(ldest, '</thead>')
call add(ldest, '<tbody>')
for row in table[head+1 :] for row in table[head+1 :]
call s:close_tag_row(row, 0, ldest, a:header_ids) call s:close_tag_row(row, 0, ldest, a:header_ids)
endfor endfor
call add(ldest, '</tbody>')
else else
for row in table[1 :] for row in table[1 :]
call s:close_tag_row(row, 0, ldest, a:header_ids) call s:close_tag_row(row, 0, ldest, a:header_ids)

View File

@ -3672,6 +3672,7 @@ Contributors and their Github usernames in roughly chronological order:
- flex (@bratekarate) - flex (@bratekarate)
- Marius Lopez (@PtitCaius) - Marius Lopez (@PtitCaius)
- Edward Bassett (@ebassett) - Edward Bassett (@ebassett)
- Gaurang Kher (@gaurangkher)
- Rafael Castillo (@eltrufas) - Rafael Castillo (@eltrufas)
- Reiner Herrmann (@reinerh) - Reiner Herrmann (@reinerh)
- Ryan Winograd - Ryan Winograd
@ -3687,6 +3688,8 @@ http://code.google.com/p/vimwiki/issues/list. They may be accessible from
https://github.com/vimwiki-backup/vimwiki/issues. https://github.com/vimwiki-backup/vimwiki/issues.
New:~ New:~
* Issue #940: Render table header inside thead element and rest under
tbody element if table header specified in wiki
* PR #811: Feature: Added handling of absolute path to vimwiki (with //) * PR #811: Feature: Added handling of absolute path to vimwiki (with //)
* PR #919: Fix duplicate helptag * PR #919: Fix duplicate helptag
* PR #907: Cycle bullets * PR #907: Cycle bullets