Skip to content

Commit 878d7f7

Browse files
committed
Tolerate filetype of eruby.html
1 parent 1bd7f2b commit 878d7f7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autoload/rails.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3655,7 +3655,7 @@ function! s:BufSyntax()
36553655
syn cluster htmlArgCluster add=@rubyStringSpecial
36563656
syn cluster htmlPreProc add=@rubyStringSpecial
36573657

3658-
elseif &syntax == 'eruby' || &syntax == 'haml'
3658+
elseif &syntax =~# '^eruby\>' || &syntax == 'haml'
36593659
syn case match
36603660
if classes != ''
36613661
exe 'syn keyword '.&syntax.'RailsUserClass '.classes.' contained containedin=@'.&syntax.'RailsRegions'
@@ -4592,7 +4592,7 @@ function! s:BufSettings()
45924592
elseif ft == 'yaml' || fnamemodify(self.name(),':e') == 'yml'
45934593
call self.setvar('&define',self.define_pattern())
45944594
call self.setvar('&suffixesadd',".yml,.csv,.rb,.".s:gsub(s:view_types,',',',.').",.rake,s.rb")
4595-
elseif ft == 'eruby'
4595+
elseif ft =~# '^eruby\>'
45964596
call self.setvar('&suffixesadd',".".s:gsub(s:view_types,',',',.').",.rb,.css,.js,.html,.yml,.csv")
45974597
if exists("g:loaded_allml")
45984598
call self.setvar('allml_stylesheet_link_tag', "<%= stylesheet_link_tag '\r' %>")
@@ -4616,7 +4616,7 @@ function! s:BufSettings()
46164616
call self.setvar('ragtag_doctype_index', 10)
46174617
endif
46184618
endif
4619-
if ft == 'eruby' || ft == 'yaml'
4619+
if ft =~# '^eruby\>' || ft ==# 'yaml'
46204620
" surround.vim
46214621
if exists("g:loaded_surround")
46224622
" The idea behind the || part here is that one can normally define the

0 commit comments

Comments
 (0)