Skip to content

Commit 55c3066

Browse files
authored
Merge pull request rails#48414 from jhawthorn/faster_block_expr
Speed up ERB expression BLOCK_EXPR regex
2 parents 0c09ae5 + d8e11e9 commit 55c3066

File tree

1 file changed

+1
-1
lines changed
  • actionview/lib/action_view/template/handlers/erb

1 file changed

+1
-1
lines changed

actionview/lib/action_view/template/handlers/erb/erubi.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def add_text(text)
4242
end
4343
end
4444

45-
BLOCK_EXPR = /\s*((\s+|\))do|\{)(\s*\|[^|]*\|)?\s*\Z/
45+
BLOCK_EXPR = /((\s|\))do|\{)(\s*\|[^|]*\|)?\s*\Z/
4646

4747
def add_expression(indicator, code)
4848
flush_newline_if_pending(src)

0 commit comments

Comments
 (0)