Merge branch '3.0-stable'

Conflicts:
	README.md
This commit is contained in:
Ben Hollis 2013-02-05 22:07:05 -08:00
commit bb2f40cc72
3 changed files with 11 additions and 4 deletions

View file

@ -71,7 +71,7 @@ The best way to get quick responses to your issues and swift fixes to your bugs
# Build & Dependency Status
[![Build Status](https://secure.travis-ci.org/middleman/middleman.png?branch=master)](http://travis-ci.org/middleman/middleman)
[![Build Status](https://travis-ci.org/middleman/middleman.png)](https://travis-ci.org/middleman/middleman)
[![Dependency Status](https://gemnasium.com/middleman/middleman.png?travis)](https://gemnasium.com/middleman/middleman)
# How to Run Cucumber Tests
@ -83,7 +83,7 @@ The best way to get quick responses to your issues and swift fixes to your bugs
# Donate
Please, [help support the Middleman team with a donation](https://spb.io/s/4dXbHBorC3).
[Click here to lend your support to Middleman](https://spacebox.io/s/4dXbHBorC3)
# License

View file

@ -72,8 +72,9 @@ module Middleman::CoreExtensions
@cache.delete(path)
end
YAML_ERRORS = [ Exception, ArgumentError ]
YAML_ERRORS = [ StandardError ]
# https://github.com/tenderlove/psych/issues/23
if defined?(Psych) && defined?(Psych::SyntaxError)
YAML_ERRORS << Psych::SyntaxError
end

View file

@ -19,6 +19,9 @@ module Middleman
# Include methods
app.send :include, InstanceMethods
app.define_hook :before_render
app.define_hook :after_render
# Activate custom renderers
require "middleman-core/renderers/erb"
app.register Middleman::Renderers::ERb
@ -249,7 +252,10 @@ module Middleman
end
# Render using Tilt
template.render(context, locs, &block)
run_hook :before_render, template.data, template
content = template.render(context, locs, &block)
run_hook :after_render, content, template
return content
ensure
# Reset stored buffer
@_out_buf = _buf_was