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

Variables with no space between them break syntax highlighting #34

Conversation

kamilturek
Copy link
Contributor

@kamilturek kamilturek commented May 3, 2022

Closes #31.

Tests output:

$ npm test

> syntax@0.2.0 test
> npm run test:snap


> syntax@0.2.0 test:snap
> npm run test:snap:hcl && npm run test:snap:sentinel && npm run test:snap:terraform


> syntax@0.2.0 test:snap:hcl
> npx vscode-tmgrammar-snap -s source.hcl -g syntaxes/hcl.tmGrammar.json -t "tests/snapshot/hcl/*.hcl"

✓ tests/snapshot/hcl/basic.hcl run successfully.
✓ tests/snapshot/hcl/blocks.hcl run successfully.
✓ tests/snapshot/hcl/comments.hcl run successfully.
✓ tests/snapshot/hcl/data_sources.hcl run successfully.
✓ tests/snapshot/hcl/expressions_conditional.hcl run successfully.
✓ tests/snapshot/hcl/expressions_dynamic.hcl run successfully.
✓ tests/snapshot/hcl/expressions_for.hcl run successfully.
Generating snapshot tests/snapshot/hcl/expressions_functions.hcl.snap
✓ tests/snapshot/hcl/expressions_operators.hcl run successfully.
✓ tests/snapshot/hcl/expressions_splat.hcl run successfully.
✓ tests/snapshot/hcl/expressions_strings.hcl run successfully.
✓ tests/snapshot/hcl/issue19.hcl run successfully.
✓ tests/snapshot/hcl/issue809.hcl run successfully.
✓ tests/snapshot/hcl/issue927.hcl run successfully.
✓ tests/snapshot/hcl/issue941.hcl run successfully.
✓ tests/snapshot/hcl/modules.hcl run successfully.
✓ tests/snapshot/hcl/nested_maps.hcl run successfully.
✓ tests/snapshot/hcl/providers.hcl run successfully.
✓ tests/snapshot/hcl/variables_input.hcl run successfully.
✓ tests/snapshot/hcl/variables_local.hcl run successfully.
✓ tests/snapshot/hcl/variables_output.hcl run successfully.

> syntax@0.2.0 test:snap:sentinel
> npx vscode-tmgrammar-snap -s source.sentinel -g syntaxes/sentinel.tmGrammar.json -t "tests/snapshot/sentinel/*.sentinel"

✓ tests/snapshot/sentinel/basic.sentinel run successfully.

> syntax@0.2.0 test:snap:terraform
> npx vscode-tmgrammar-snap -s source.hcl.terraform -g syntaxes/terraform.tmGrammar.json  -g syntaxes/hcl.tmGrammar.json -t "tests/snapshot/terraform/*.tf"

✓ tests/snapshot/terraform/basic.tf run successfully.
✓ tests/snapshot/terraform/blocks.tf run successfully.
✓ tests/snapshot/terraform/comments.tf run successfully.
✓ tests/snapshot/terraform/data_sources.tf run successfully.
✓ tests/snapshot/terraform/expressions_conditional.tf run successfully.
✓ tests/snapshot/terraform/expressions_dynamic.tf run successfully.
✓ tests/snapshot/terraform/expressions_for.tf run successfully.
✓ tests/snapshot/terraform/expressions_functions.tf run successfully.
✓ tests/snapshot/terraform/expressions_operators.tf run successfully.
✓ tests/snapshot/terraform/expressions_splat.tf run successfully.
✓ tests/snapshot/terraform/expressions_strings.tf run successfully.
✓ tests/snapshot/terraform/issue19.tf run successfully.
✓ tests/snapshot/terraform/issue809.tf run successfully.
✓ tests/snapshot/terraform/issue927.tf run successfully.
✓ tests/snapshot/terraform/issue941.tf run successfully.
✓ tests/snapshot/terraform/modules.tf run successfully.
✓ tests/snapshot/terraform/nested_maps.tf run successfully.
✓ tests/snapshot/terraform/providers.tf run successfully.
✓ tests/snapshot/terraform/variables_input.tf run successfully.
✓ tests/snapshot/terraform/variables_local.tf run successfully.
✓ tests/snapshot/terraform/variables_output.tf run successfully.

Before:
before

After:
after

@jpogran
Copy link
Contributor

jpogran commented May 3, 2022

Thank you for the contribution! It may take awhile for us to review this, we have a couple other things in flight but will review this soon.

Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for the fix and the screenshots as well!

@radeksimko radeksimko merged commit e1afa69 into hashicorp:main May 20, 2022
@radeksimko radeksimko added this to the 0.3.0 milestone May 20, 2022
@kamilturek kamilturek deleted the b-variables-with-no-whitespace-between-them branch May 20, 2022 19:04
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.

Variables with no space between them break syntax highlighting
3 participants