speedtyper.dev
speedtyper.dev copied to clipboard
Don't let non-latin characters in
Otherwise you get this
+1, yesterday I got an emoji of a snowman in my snippet :D
same problem, twice seen this file with heart
I'd be open to a PR on this. There are a couple of different options on approaches, but I'd consider something like this:
- Add a function which checks if a string includes invalid characters. Unit test on several code examples to ensure it does not exclude valid snippets and correctly excludes invalid challenges.
- Use function to filter out invalid nodes in the data seeding pipeline
- Write a command backfilling current challenges and deletes it if it includes invalid characters
Here are some example of commands, including backfills: https://github.com/codicocodes/speedtyper.dev/tree/main/packages/back-nest/src/challenges/commands