- Fixed convert description.

This commit is contained in:
Shougo Matsushita 2012-11-01 11:29:37 +09:00
parent 96cf9fd8ad
commit 2a2be48c3b
2 changed files with 6 additions and 7 deletions

View File

@ -353,13 +353,11 @@ function! s:parse_snippets_file(snippets, snippets_file)"{{{
" Fall back to using the name and description (abbr) combined. " Fall back to using the name and description (abbr) combined.
" SnipMate snippets may have duplicate names, but different " SnipMate snippets may have duplicate names, but different
" descriptions (abbrs). " descriptions (abbrs).
if has_key(dup_check, snippet_dict.name) let description = matchstr(line, '^snippet\s\+\zs.*$')
let description = matchstr(line, '^snippet\s\+\zs.*$') if description !=# snippet_dict.name
if description !=# snippet_dict.name " Convert description.
" Convert description. let snippet_dict.name =
let snippet_dict.name = \ substitute(description, '\W\+', '_', 'g')
\ substitute(description, '\W\+', '_', 'g')
endif
endif endif
" Collect the description (abbr) of the snippet, if set on snippet line. " Collect the description (abbr) of the snippet, if set on snippet line.

View File

@ -640,6 +640,7 @@ CHANGELOG *neosnippet-changelog*
2012-11-01 2012-11-01
- Fixed snippet mirror behavior. - Fixed snippet mirror behavior.
- Fixed substitute of target. - Fixed substitute of target.
- Fixed convert description.
2012-10-31 2012-10-31
- Improved indent_snippet(). - Improved indent_snippet().