From f58bdae1f716c71202546c5a40a951b5fc54a591 Mon Sep 17 00:00:00 2001 From: Simon Jefford Date: Sun, 16 May 2010 01:22:30 +0100 Subject: Check blocks are not incorrectly detected when compiling erubis templates [#4575 state:resolved] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- actionpack/lib/action_view/template/handlers/erb.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/template/handlers/erb.rb') diff --git a/actionpack/lib/action_view/template/handlers/erb.rb b/actionpack/lib/action_view/template/handlers/erb.rb index 705c2bf82e..237746437a 100644 --- a/actionpack/lib/action_view/template/handlers/erb.rb +++ b/actionpack/lib/action_view/template/handlers/erb.rb @@ -28,7 +28,7 @@ module ActionView src << "@output_buffer.safe_concat('" << escape_text(text) << "');" end - BLOCK_EXPR = /(do|\{)(\s*\|[^|]*\|)?\s*\Z/ + BLOCK_EXPR = /\s+(do|\{)(\s*\|[^|]*\|)?\s*\Z/ def add_expr_literal(src, code) if code =~ BLOCK_EXPR -- cgit v1.2.3