Skip to content

Issue - 5: to_camel_case does not preserve special characters correctly #7

Description

@O-sama12

The to_camel_case function alters or drops special characters when they should remain unchanged.

❌ Failing case:
def test_special_chars_camel_case(): assert textcraft.to_camel_case("t3$T./'_-&%®#") == "t3$T./'_-&%®#"

🔍 Actual output:
"t3$t./'&%®#"

✅ Expected output:
"t3$T./'_-&%®#"

💡 Expected Behavior:

  • Special characters should not be removed or modified
  • Case transformation should apply only to alphabetic characters
  • Input with no word boundaries should be returned as-is

🛠 Suggested fix:
Review how the function:

  • Identifies word separators
  • Handles non-alphanumeric characters during transformation

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions