Skip to content

Commit

Permalink
Merge pull request #61 from SidOfc/patch/csv-empty-values
Browse files Browse the repository at this point in the history
Fix #59, CSV to table now also creates empty cells, also add some mor…
  • Loading branch information
SidOfc authored Aug 17, 2018
2 parents 8a14d77 + bc75b04 commit a27fe0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autoload/mkdx.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1353,8 +1353,9 @@ fun! mkdx#Tableize() range

for linec in linecount
if !empty(filter(lines[linec], {idx, val -> !empty(val)}))
let tmp = map(range(0, len(col_idx) - 1), {idx, val -> get(lines[linec], idx, '')})
call setline(a:firstline + linec,
\ ld[1:2] . join(map(lines[linec], {key, val -> s:util.AlignString(val, get(col_align, get(col_idx, key, ''), 'center'), col_maxlen[key])}), ld) . ld[0:1])
\ ld[1:2] . join(map(tmp, {key, val -> s:util.AlignString(val, get(col_align, get(col_idx, key, ''), 'center'), col_maxlen[key])}), ld) . ld[0:1])
endif
endfor

Expand Down
3 changes: 3 additions & 0 deletions test/components/links.vader
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ Then (Check cursor positioned on line: 7, col: 47):

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Execute (empty quickfix):
call setqflist([])

Given markdown (Example with <a> tag with "id" or "name" attribute):

# with a header
Expand Down

0 comments on commit a27fe0f

Please sign in to comment.