summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/prism/lex_compat.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/prism/lex_compat.rb b/lib/prism/lex_compat.rb
index 4f8e443a3b..a83c24cb41 100644
--- a/lib/prism/lex_compat.rb
+++ b/lib/prism/lex_compat.rb
@@ -481,7 +481,7 @@ module Prism
embexpr_balance -= 1
when :on_tstring_content
if embexpr_balance == 0
- while index < max_index && tokens[index].event == :on_tstring_content
+ while index < max_index && tokens[index].event == :on_tstring_content && !token.value.match?(/\\\r?\n\z/)
token.value << tokens[index].value
index += 1
end