Skip to content

Display control chars and invisible Unicode explicitly (#220)#228

Open
AJTimePyro wants to merge 2 commits intogruns:masterfrom
AJTimePyro:master
Open

Display control chars and invisible Unicode explicitly (#220)#228
AJTimePyro wants to merge 2 commits intogruns:masterfrom
AJTimePyro:master

Conversation

@AJTimePyro
Copy link

@AJTimePyro AJTimePyro commented Jan 3, 2026

This pull request improves how argumentToString converts strings by making escaping safer and more predictable, especially for edge cases that were previously mishandled. Inspired from issue #220

What changed:

  • Better Escaping: Now identifies and escapes control characters, zero-width spaces, and NBSP using a new regex mapping.
  • Backslash Handling: All backslashes are now correctly escaped.
  • Multi-line Support: Refined how multi-line strings are formatted for better readability.
  • New Dependency: Added import re for the character detection logic.

@Jakeroid
Copy link
Collaborator

Jakeroid commented Jan 5, 2026

@AJTimePyro

Thank you! That looks promising! I'll take a look.

@AJTimePyro
Copy link
Author

cool, let me know if there's any issue or something,... i will change accordingly

@Jakeroid
Copy link
Collaborator

Jakeroid commented Jan 7, 2026

@AJTimePyro I think it would be nice to have test covered this one. Do you think you could do that?

Keep in mind, that recently I merged tests refactoring (in PEP8 style).

@AJTimePyro
Copy link
Author

I can try to create some test

@AJTimePyro
Copy link
Author

@Jakeroid I have added some tests, you can check them out.

@Jakeroid
Copy link
Collaborator

@AJTimePyro Tests are failed. Could you take a look please?

@Jakeroid
Copy link
Collaborator

@AJTimePyro Oh, I know why. Because of recent refactoring which was did here: #223

Do you think you could fix issues by keeping refactoring in place?

@AJTimePyro
Copy link
Author

oh okay i will fix it soon

@Jakeroid
Copy link
Collaborator

@AJTimePyro awesome

thank you!

@Jakeroid
Copy link
Collaborator

@AJTimePyro How is it going?

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