Closed rmosolgo closed 6 years ago
@50Wliu Does this concept sound ok to you?
I'll get around to it soon. Without looking at the code changes, it sounds like a good thing to add support for.
Thanks for taking a quick look, glad to hear I'm on the right track :)
👋 Hi, if someone has a chance, I'd appreciate a review of this! (or feel free to close it, if it's not a good fit for merging.)
@maxbrunsfeld Can you take a look here perhaps?
Hi @rmosolgo, thanks a lot for the PR! The grammar changes look good to me, but do you mind adding an additional case to test backtick quoting? Once that's done this PR should be good to merge!
Just realized I can easily just add the extra case through the web editor :) Once CI passes I'll get this merged and updated!
Woah, thanks! I'm looking forward to using this 😊
Thanks for maintaining this project and considering my PR!
Description of the Change
Ruby supports quoted heredocs:
But they aren't captured by the current grammar. This change adds quotes to the heredoc regexps so that they'll be properly tokenized.
Alternate Designs
No alternate deisgns were considered.
Benefits
We use single-quoted heredocs to assert that interpolation is not possible. This is a security check: interpolation can lead to various injection bugs.
Embedded code is not highlighted right now:
But after this change, it will be highlighted!
Possible Drawbacks
Added complexity to the heredoc regexp.
Applicable Issues
I didn't find any.