Braindead "fix" for Rails 3's eruby sytax

Rails 3 ships with its own version of Erb. Plain old Erb barfes on things like
<%= form_for ... do %> instead of old <% form_for ... do %>

For the moment, let's use sed to filter out this case. Dirty kludge, but that
will do for now.
This commit is contained in:
Dominique Rose-Rosette 2011-02-03 12:48:12 +01:00
parent 7e183dd2e2
commit b6bfca9701

View File

@ -20,7 +20,7 @@ if !executable("ruby") || !executable("cat")
endif endif
function! SyntaxCheckers_eruby_GetLocList() function! SyntaxCheckers_eruby_GetLocList()
let makeprg='cat '. shellescape(expand("%")) . ' \| RUBYOPT= ruby -e "require \"erb\"; puts ERB.new(ARGF.read, nil, \"-\").src" \| RUBYOPT= ruby -c' let makeprg='sed "s/<%=/<%/g" '. shellescape(expand("%")) . ' \| RUBYOPT= ruby -e "require \"erb\"; puts ERB.new(ARGF.read, nil, \"-\").src" \| RUBYOPT= ruby -c'
let errorformat='%-GSyntax OK,%E-:%l: syntax error\, %m,%Z%p^,%W-:%l: warning: %m,%Z%p^,%-C%.%#' let errorformat='%-GSyntax OK,%E-:%l: syntax error\, %m,%Z%p^,%W-:%l: warning: %m,%Z%p^,%-C%.%#'
let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })