Skip to content

Commit

Permalink
Merge pull request #48414 from jhawthorn/faster_block_expr
Browse files Browse the repository at this point in the history
Speed up ERB expression BLOCK_EXPR regex
  • Loading branch information
jhawthorn committed Jun 7, 2023
2 parents 0c09ae5 + d8e11e9 commit 55c3066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionview/lib/action_view/template/handlers/erb/erubi.rb
Expand Up @@ -42,7 +42,7 @@ def add_text(text)
end
end

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

def add_expression(indicator, code)
flush_newline_if_pending(src)
Expand Down

0 comments on commit 55c3066

Please sign in to comment.