A heredoc following a comment that ends with a full-stop . is not highlighted properly.
let(:source) do
# Empty lines should make no difference.
<<~RUBY
if #{condition}
#{body}
end
RUBY
end

Removing the full-stop . at the end of the comment allows the heredoc to be highlighted as expected:

Unfortunately, I can't think of a way to fix this in a well-performing manner as I think it would require look-behind assertions to check if the preceding dot is part of a comment.
A heredoc following a comment that ends with a full-stop
.is not highlighted properly.Removing the full-stop
.at the end of the comment allows the heredoc to be highlighted as expected:Unfortunately, I can't think of a way to fix this in a well-performing manner as I think it would require look-behind assertions to check if the preceding dot is part of a comment.