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:
parent
7e183dd2e2
commit
b6bfca9701
@ -20,7 +20,7 @@ if !executable("ruby") || !executable("cat")
|
||||
endif
|
||||
|
||||
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 loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user