Unescape special characters () within the commmentstring
This commit is contained in:
Dhruva Sagar
2016-05-08 15:57:13 +05:30
parent 7c56d298bb
commit b613e39bd0

View File

@@ -78,7 +78,7 @@ endfunction
function! tablemode#table#GetCommentStart() "{{{2
let cstring = &commentstring
if tablemode#utils#strlen(cstring) > 0
return substitute(split(cstring, '%s')[0], '.', '\\\0', 'g')
return substitute(split(cstring, '%s')[0], '[^()]', '\\\0', 'g')
else
return ''
endif
@@ -98,7 +98,7 @@ function! tablemode#table#GetCommentEnd() "{{{2
if tablemode#utils#strlen(cstring) > 0
let cst = split(cstring, '%s')
if len(cst) == 2
return substitute(cst[1], '.', '\\\0', 'g')
return substitute(cst[1], '[^()]', '\\\0', 'g')
else
return ''
endif