mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-10 02:33:48 -05:00
remove spaces from delimiters when using &commentstring
This commit is contained in:
@@ -723,8 +723,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
|||||||
else
|
else
|
||||||
|
|
||||||
"extract the delims from &commentstring
|
"extract the delims from &commentstring
|
||||||
let left= substitute(&commentstring, '\(.*\)%s.*', '\1', '')
|
let left= substitute(&commentstring, '\([^ \t]*\)\s*%s.*', '\1', '')
|
||||||
let right= substitute(&commentstring, '.*%s\(.*\)', '\1', 'g')
|
let right= substitute(&commentstring, '.*%s\s*\(.*\)', '\1', 'g')
|
||||||
|
|
||||||
call s:MapDelimiters(left,right)
|
call s:MapDelimiters(left,right)
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user