Skip to content

Conversation

@Leonabcd123
Copy link
Contributor

Description

Made it so all \t are converted to tab characters.

Closes

Fixes #6906

@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Aug 25, 2025
@Leonabcd123 Leonabcd123 changed the title fix: All \t are converted to tab characters. fix: All \t are converted to tab characters (@Leonabcd123). Aug 25, 2025
@Leonabcd123 Leonabcd123 changed the title fix: All \t are converted to tab characters (@Leonabcd123). fix: All \t are converted to tab characters (@Leonabcd123) Aug 25, 2025
@Miodec
Copy link
Member

Miodec commented Aug 25, 2025

This PR is a regression because you won't be able to escape the \t character with \\t to type the literal \t text. Please make sure your changes don't affect existing functionality.

@Miodec Miodec added the waiting for update Pull requests or issues that require changes/comments before continuing label Aug 25, 2025
@github-actions github-actions bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label Aug 25, 2025
@Miodec
Copy link
Member

Miodec commented Aug 25, 2025

Do you think it would be a good idea to extract this functionality to the strings util file and add some tests? To make sure with \\t\\t\\t we get literal \t\t\t correctly?

@Leonabcd123
Copy link
Contributor Author

Do you want to move it to frontend/src/ts/utils/strings.ts?

@Miodec
Copy link
Member

Miodec commented Aug 25, 2025

Yeah. Call it replaceControlCharacters

Copy link
Member

@Miodec Miodec left a comment

Choose a reason for hiding this comment

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

Thanks

@Miodec Miodec merged commit 7a6a54c into monkeytypegame:master Aug 25, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/t's in saved text files are not getting indented in a single go

3 participants