Skip to content

Commit 0f97e08

Browse files
committed
Fix detection of quoted default locale
Closes tpope#298.
1 parent 8d4bf4c commit 0f97e08

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

autoload/rails.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ function! s:app_default_locale() dict abort
833833
let candidates = map(filter(
834834
\ s:readfile(self.path('config/application.rb')) + s:readfile(self.path('config/environment.rb')),
835835
\ 'v:val =~ "^ *config.i18n.default_locale = :[\"'']\\=[A-Za-z-]\\+[\"'']\\= *$"'
836-
\ ), 'matchstr(v:val,"[A-Za-z-]\\+[\"'']\\= *$")')
836+
\ ), 'matchstr(v:val,"[A-Za-z-]\\+\\ze[\"'']\\= *$")')
837837
call self.cache.set('default_locale', get(candidates, 0, 'en'))
838838
endif
839839
return self.cache.get('default_locale')

0 commit comments

Comments
 (0)