Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scan forward until text tokens match
Text tokens may be conditionally appended to the output buffer. For example if we have a template like this: ```erb <h1>Oh no!</h1> This template has a runtime error <b> <% if true %> <%= method_that_does_not_exist %> <% end %> </b> Yikes! ``` In the above case, a string literal (`" "`) will be conditionally appended to the output buffer with some code like below: ```ruby @output_buffer.safe_append=' '.freeze ``` This commit teaches text tokens (string literals) to scan forward in the compiled template until it finds the literal, thereby skipping the code generated for appending to the output buffer. Related to: * Bug: #48173 * PR: #48184
- Loading branch information