-
Notifications
You must be signed in to change notification settings - Fork 168
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
Add ERB support in HEREDOC #2903
base: main
Are you sure you want to change the base?
Conversation
I have signed the CLA! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something seems to be missing still. I tested this branch with some ERB heredocs and it looks like the ERB grammar is only being partially applied for some reason. I'm not sure why yet.
@@ -1653,6 +1653,44 @@ | |||
} | |||
] | |||
}, | |||
{ | |||
"begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)erb)\\b\\1))", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all of the other cases, we only support upper case delimiters.
"begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)erb)\\b\\1))", | |
"begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)ERB)\\b\\1))", |
"name": "meta.embedded.block.erb", | ||
"patterns": [ | ||
{ | ||
"begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)erb)\\b\\1)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all of the other cases, we only support upper case delimiters.
"begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)erb)\\b\\1)", | |
"begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)ERB)\\b\\1)", |
Motivation
Closes #2863
Implementation
Added the ERB config to the definition file and update the test
Automated Tests
The test case is updated to check for the ERB format in heredoc.
Manual Tests