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

Support regular expressions in Terraform lexer #1490

Merged
merged 2 commits into from
Apr 9, 2020

Conversation

pyrmont
Copy link
Contributor

@pyrmont pyrmont commented Apr 8, 2020

In a Terraform file, an interpolated expression can include a regular expression of the form "/.../". This PR adds rules that identify regular expressions. It fixes #1304.

@pyrmont pyrmont added the needs-review The PR needs to be reviewed label Apr 8, 2020
@pyrmont pyrmont self-assigned this Apr 8, 2020
@pyrmont
Copy link
Contributor Author

pyrmont commented Apr 8, 2020

@sashee I'm really sorry for how long this took. I'm afraid it fell off the radar and I only noticed it again today. I think this fixes the problem you described in your issue but please let me know if you spot anything amiss.

@sashee
Copy link

sashee commented Apr 8, 2020

@pyrmont, no worries, thanks for looking into this!

@pyrmont pyrmont merged commit 2f16c1c into rouge-ruby:master Apr 9, 2020
@pyrmont pyrmont removed the needs-review The PR needs to be reviewed label Apr 9, 2020
@pyrmont
Copy link
Contributor Author

pyrmont commented Apr 9, 2020

@sashee Thanks again for the bug report. The updated version of the lexer will go out as part of Rouge v3.18.0. That's scheduled for release on Tuesday 14 April 😃

@pyrmont pyrmont deleted the bugfix.terraform-regex-chars branch April 9, 2020 08:39
mattt pushed a commit to NSHipster/rouge that referenced this pull request May 21, 2020
In Terraform, an interpolated expression can include a regular
expression of the form `"/.../"`. This commit adds rules that identify
regular expressions and a state for tokenising these expressions
correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regexp error in Terraform
2 participants