Skip to content

Commit

Permalink
Merge pull request #3086 from ruby/fix-up-lex-difference
Browse files Browse the repository at this point in the history
Fix up lex difference when ~ heredoc with 0 dedent and line continuation
  • Loading branch information
kddnewton authored Sep 25, 2024
2 parents 4141731 + 84a9251 commit 63e03a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/prism/lex_compat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def to_a
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
Expand Down

0 comments on commit 63e03a5

Please sign in to comment.