X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/8b54e061e105fba060d6c24c0a05679c2f951810..0a534a29f490adcd0612ff10a53b04109385404c:/ftplugin/markdown.vim?ds=sidebyside diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index c7832d7..5db57d8 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -456,11 +456,16 @@ function! s:TableFormat() " Search instead of `normal! j` because of the table at beginning of file edge case. call search('|') normal! j - " Remove everything that is not a pipe othewise well formated tables would grow - " because of addition of 2 spaces on the separator line by Tabularize /|. + " Remove everything that is not a pipe, colon or hyphen next to a colon othewise + " well formated tables would grow because of addition of 2 spaces on the separator + " line by Tabularize /|. let l:flags = (&gdefault ? '' : 'g') - execute 's/[^|]//' . l:flags + execute 's/\(:\@