Skip to content

Conversation

yelaissaoui
Copy link

@yelaissaoui yelaissaoui commented Mar 11, 2025

Description

Fixes #211.

TODOs

Read the Gruntwork contribution guidelines.

  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

Release Notes

Updated [x].
Fix camelCaseLower template helper that was rendering capital letter in the middle of the words.

Migration Guide

@denis256
Copy link
Member

Fail multiple tests:

TestRenderTemplate
TestCamelCase
TestCamelCaseLower
TestRenderTemplate/Camel_case_test:_{{_.Foo_|_camelCase_}}
TestRenderTemplate/Camel_case_lower_test:_{{_.Foo_|_camelCaseLower_}}

@yelaissaoui
Copy link
Author

TestRenderTemplate

It seems like the test cases expect the output to keep capital letters in the middle of words. Is this intended?

@yelaissaoui yelaissaoui requested a review from denis256 March 25, 2025 13:45
@yelaissaoui
Copy link
Author

I've updated the tests for the camelCase function, can we re-run CI ?

@Resonance1584
Copy link
Collaborator

Hi @yelaissaoui - thanks for your contribution!
This is technically a breaking change, and looking at the tests I believe the original intent was to preserve acronyms e.g. ID in fooID.

To get this merged could you make new functions camelCaseNormalized and camelCaseNormalizedLower which perform this functionality - and update the comment on camelCase to accurately reflect that it preserves acronyms?

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.

camelCase output not as expected
3 participants