[ruby/prism] Fix up lex difference when ~ heredoc with 0 dedent and line continuation
https://github.com/ruby/prism/commit/84a9251915
This commit is contained in:
parent
12cf9f2ae5
commit
b97ff7dfda
@ -481,7 +481,7 @@ module Prism
|
|||||||
embexpr_balance -= 1
|
embexpr_balance -= 1
|
||||||
when :on_tstring_content
|
when :on_tstring_content
|
||||||
if embexpr_balance == 0
|
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
|
token.value << tokens[index].value
|
||||||
index += 1
|
index += 1
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user