Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lower-case-ing the heredoc language #554

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

## [Unreleased]

- Fixed default tokenization of heredocs in Ruby (should be tokenized as string)
- Added a modern implementation of Tree-sitter grammars behind an experimental flag. Enable the “Use Modern Tree-Sitter Implementation” in the Core settings to try it out.

## 1.105.0
Expand Down
1 change: 1 addition & 0 deletions packages/language-ruby/grammars/ts/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@
(bare_string)
(heredoc_body)
(heredoc_beginning)
(heredoc_content)
] @string.unquoted.ruby

((heredoc_body) @meta.embedded
Expand Down
2 changes: 1 addition & 1 deletion packages/language-ruby/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports.activate = function() {
atom.grammars.addInjectionPoint('source.ruby', {
type: 'heredoc_body',
language(node) {
return node.lastChild.text;
return node.lastChild.text?.toLowerCase();
},
content(node) {
return node.descendantsOfType('heredoc_content')
Expand Down
Loading