Remove Tilt mappings for missing libraries. Fixes #713
This commit is contained in:
parent
84239f04a2
commit
eccda125e5
7 changed files with 39 additions and 0 deletions
|
@ -75,6 +75,19 @@ module Middleman
|
|||
app.register Middleman::Renderers::Stylus
|
||||
rescue LoadError
|
||||
end
|
||||
|
||||
# Clean up missing Tilt exts
|
||||
app.after_configuration do
|
||||
Tilt.mappings.each do |key, klasses|
|
||||
begin
|
||||
Tilt[".#{key}"]
|
||||
rescue LoadError
|
||||
Tilt.mappings.delete(key)
|
||||
rescue NameError
|
||||
Tilt.mappings.delete(key)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
alias :included :registered
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue