Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 82f8496

Browse files
author
Jamie Learmonth
committed
Fixing regex for matching of form classes validators
1 parent c15b3e4 commit 82f8496

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

symfony.vim

+2-2
Original file line numberDiff line numberDiff line change
@@ -362,14 +362,14 @@ endfunction
362362
function! SfLoadFormTemplate()
363363
call SfLoadTemplate('form')
364364

365-
let l:form_name = substitute(expand('%:t'), '\(.*\)Form.class.php', '\1', 'g')
365+
let l:form_name = substitute(expand('%:t'), '\(.*\)Form\(.class\)\?.php', '\1', 'g')
366366
call SfSubstitutePlaceHolder('###FORMNAME###', l:form_name)
367367
endfunction
368368

369369
function! SfLoadValidatorTemplate()
370370
call SfLoadTemplate('validator')
371371

372-
let l:validator_name = substitute(expand('%:t'), '\(.*\)Validator.class.php', '\1', 'g')
372+
let l:validator_name = substitute(expand('%:t'), '\(.*\)Validator\(.class\)\?.php', '\1', 'g')
373373
call SfSubstitutePlaceHolder('###VALIDATORNAME###', l:validator_name)
374374
endfunction
375375

0 commit comments

Comments
 (0)