we currently treat the second """ as end delimiter, which is not correct.
This PR essentially adds a constraint, such that when parsing heredoc content, we recognise end delimiter only when it goes in a new line (with optional leading whitespace).
As a side effect, we now don't distinguish escaped newlines (\<enter>) inside heredocs, otherwise we wouldn't treat \<enter>""" as end delimiter. I tried a number of things and I don't see any solution with reasonable complexity. In practice this means we won't highlight \ in this particular case, which seems fine to me.
Given
we currently treat the second
"""
as end delimiter, which is not correct.This PR essentially adds a constraint, such that when parsing heredoc content, we recognise end delimiter only when it goes in a new line (with optional leading whitespace).
As a side effect, we now don't distinguish escaped newlines (
\<enter>
) inside heredocs, otherwise we wouldn't treat\<enter>"""
as end delimiter. I tried a number of things and I don't see any solution with reasonable complexity. In practice this means we won't highlight\
in this particular case, which seems fine to me.