Skip to content

Commit

Permalink
Fix TableFormat for indented tables, version 2
Browse files Browse the repository at this point in the history
Improved version of 6fe1a10 that
doesn't get fooled by colons.
  • Loading branch information
tomtomjhj committed Feb 9, 2022
1 parent d7038a6 commit e82be74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ftplugin/markdown.vim
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ function! s:TableFormat()
" Move colons for alignment to left or right side of the cell.
execute 's/:\( \+\)|/\1:|/e' . l:flags
execute 's/|\( \+\):/|:\1/e' . l:flags
execute 's/ /-/' . l:flags
execute 's/|:\?\zs[ -]\+\ze:\?|/\=repeat("-", len(submatch(0)))/' . l:flags
call setpos('.', l:pos)
endfunction

Expand Down

0 comments on commit e82be74

Please sign in to comment.