- Fixed convert description.

This commit is contained in:
Shougo Matsushita 2012-11-09 14:25:32 +09:00
parent 17ab5b07f0
commit bc1f26d74d
2 changed files with 5 additions and 3 deletions

View File

@ -410,11 +410,12 @@ function! s:parse_snippet_name(snippets_file, line, linenr, dup_check)"{{{
" 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).
let description = matchstr(a:line, '^snippet\s\+\S\+\zs.*$') let description = matchstr(a:line, '^snippet\s\+\S\+\s\+\zs.*$')
if description !=# snippet_dict.name if description != '' && description !=# snippet_dict.name
" Convert description. " Convert description.
let snippet_dict.name .= '_' . let snippet_dict.name .= '_' .
\ substitute(description, '\W\+', '_', 'g') \ substitute(substitute(
\ description, '\W\+', '_', 'g'), '_\+$', '', '')
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

@ -716,6 +716,7 @@ CHANGELOG *neosnippet-changelog*
- Improved syntax error. - Improved syntax error.
- Fixed error in java snippet. - Fixed error in java snippet.
- Improved snippet rank. - Improved snippet rank.
- Fixed convert description.
2012-11-07 2012-11-07
- Fixed s:indent_snippet(). - Fixed s:indent_snippet().