Lower-case-ing the heredoc language
Two small fixes here:
- Usually, on Ruby, "heredocs" are always uppercase. So I'm lower-casing so that it tries to get the right grammar
- When a grammar is not found, heredocs are highlighted as strings
Typically the injectionRegex has been written to capture either uppercase or lowercase, but I don't have a problem with this. Seems like a more elegant way of handling it.
@savetheclocktower just wanted to be sure what do you think about the (heredoc_content) being highlighted as string, but if you don't have any problem with it, I'll just write a test case and be done with this :)
Doesn't heredoc_body take care of that?
Not really, it was only highlighting around the doc, not the contents
So heredoc_content is a child of heredoc_body. We should choose to apply string.unquoted.ruby to one of them, not both, or else the scope will get repeated.
Hang on. This feedback still needs to be addressed:
So heredoc_content is a child of heredoc_body. We should choose to apply string.unquoted.ruby to one of them, not both, or else the scope will get repeated
Ok, @savetheclocktower, it seems that it's better to apply only to heredoc_body because heredoc_content only applies to the inside of the string - so the highlighting could become really weird...
Perhaps this PR can be updated since we've had quite a lot of Tree-Sitter related fixes implemented since this was originally opened?