summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/eruby.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax/eruby.vim')
-rw-r--r--runtime/syntax/eruby.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/syntax/eruby.vim b/runtime/syntax/eruby.vim
index c20b086ba5..4e175bcc25 100644
--- a/runtime/syntax/eruby.vim
+++ b/runtime/syntax/eruby.vim
@@ -22,7 +22,7 @@ elseif !exists("b:eruby_subtype") && main_syntax == 'eruby'
let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+')
if b:eruby_subtype == ''
- let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$')
+ let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+\%(\ze+\w\+\)\=$')
endif
if b:eruby_subtype == 'rhtml'
let b:eruby_subtype = 'html'