Merge branch '3.0-stable'
Conflicts: README.md
This commit is contained in:
commit
bb2f40cc72
|
@ -71,7 +71,7 @@ The best way to get quick responses to your issues and swift fixes to your bugs
|
||||||
|
|
||||||
# Build & Dependency Status
|
# 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)
|
[![Dependency Status](https://gemnasium.com/middleman/middleman.png?travis)](https://gemnasium.com/middleman/middleman)
|
||||||
|
|
||||||
# How to Run Cucumber Tests
|
# 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
|
# 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
|
# License
|
||||||
|
|
||||||
|
|
|
@ -72,8 +72,9 @@ module Middleman::CoreExtensions
|
||||||
@cache.delete(path)
|
@cache.delete(path)
|
||||||
end
|
end
|
||||||
|
|
||||||
YAML_ERRORS = [ Exception, ArgumentError ]
|
YAML_ERRORS = [ StandardError ]
|
||||||
|
|
||||||
|
# https://github.com/tenderlove/psych/issues/23
|
||||||
if defined?(Psych) && defined?(Psych::SyntaxError)
|
if defined?(Psych) && defined?(Psych::SyntaxError)
|
||||||
YAML_ERRORS << Psych::SyntaxError
|
YAML_ERRORS << Psych::SyntaxError
|
||||||
end
|
end
|
||||||
|
|
|
@ -19,6 +19,9 @@ module Middleman
|
||||||
# Include methods
|
# Include methods
|
||||||
app.send :include, InstanceMethods
|
app.send :include, InstanceMethods
|
||||||
|
|
||||||
|
app.define_hook :before_render
|
||||||
|
app.define_hook :after_render
|
||||||
|
|
||||||
# Activate custom renderers
|
# Activate custom renderers
|
||||||
require "middleman-core/renderers/erb"
|
require "middleman-core/renderers/erb"
|
||||||
app.register Middleman::Renderers::ERb
|
app.register Middleman::Renderers::ERb
|
||||||
|
@ -249,7 +252,10 @@ module Middleman
|
||||||
end
|
end
|
||||||
|
|
||||||
# Render using Tilt
|
# 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
|
ensure
|
||||||
# Reset stored buffer
|
# Reset stored buffer
|
||||||
@_out_buf = _buf_was
|
@_out_buf = _buf_was
|
||||||
|
|
Loading…
Reference in a new issue