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

feat(formatter): prevent indentation of #FASTLY macros #335

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

acme
Copy link
Contributor

@acme acme commented Jul 16, 2024

  • Modified the formatComment() function to skip indentation for comments starting with #FASTLY
  • Added unit tests to verify the new behaviour for regular comments, #FASTLY macros, and mixed comment scenarios
  • This change ensures that #FASTLY macros remain at the start of the line, adhering to Fastly's VCL formatting conventions, e.g.:

- Modified the formatComment function to skip indentation for comments
  starting with "#FASTLY"
- Added unit tests to verify the new behaviour for regular comments,
  #FASTLY macros, and mixed comment scenarios
- This change ensures that #FASTLY macros remain at the start of the line,
  adhering to Fastly's VCL formatting conventions, e.g.:
  - https://www.fastly.com/documentation/guides/vcl/using/#custom-vcl
Copy link
Owner

@ysugimoto ysugimoto left a comment

Choose a reason for hiding this comment

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

I didn't care about this, thanks!

@ysugimoto ysugimoto merged commit 0831113 into ysugimoto:main Jul 17, 2024
1 check passed
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.

2 participants