Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom text mode #68

Closed
wants to merge 12 commits into from
Closed

Add custom text mode #68

wants to merge 12 commits into from

Conversation

andybui01
Copy link

Usage:
enter custom in input box and use mod + m to switch to custom mode.

Copy link
Contributor

@jakergrossman jakergrossman left a comment

Choose a reason for hiding this comment

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

Looks great! A few file formatting things (newlines and tabs) but I like it overall 👍

index.html Outdated Show resolved Hide resolved
main.js Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
main.js Outdated Show resolved Hide resolved
main.js Outdated
const regex = /[\u0A00-\u0A7F\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff\uff66-\uff9f\u3131-\uD79D]+|[\u0400-\u04FFa-zA-Z0-9!:;'",.\/?!@#$%^&*()_}{\[\]-]+\'*[a-z]*/g;
let array = [...str.match(regex)];
return array;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Make sure you have a newline at the end of your file.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not "reformat" the whole file! Configure your editor to use the original code style.

Copy link
Author

Choose a reason for hiding this comment

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

Yh, I'll fix that, while changing the tab indents to spaces I must've inadvertently reformated the entire file.

main.js Outdated Show resolved Hide resolved
main.js Outdated Show resolved Hide resolved
main.js Outdated Show resolved Hide resolved
@andybui01
Copy link
Author

I've moved the punctuation mark regex out into a global constant, as a result regex literals are no generated by concatenating strings before creating the RegExp objects themselves.

See d1a8ed8

@briemens
Copy link
Contributor

briemens commented May 8, 2020

Usage:
enter custom in input box and use mod + m to switch to custom mode.

Can you explain what this does? How it works? What happens when you switch to "custom mode".
Screenshot or animated gif with a demonstration would be helpful.

@andybui01
Copy link
Author

Usage:
enter custom in input box and use mod + m to switch to custom mode.

Can you explain what this does? How it works? What happens when you switch to "custom mode".
Screenshot or animated gif with a demonstration would be helpful.

When in custom mode you can paste your own text and run the typing test on said text. I'm not really familiar with making gifs but here's a screenshot of the prompt when you switch to custom mode.
image

@SeerLite SeerLite mentioned this pull request Dec 18, 2020
@SeerLite
Copy link

Conflicts can be resolved with dos2unix, on Linux at least.
I have the feeling the original repo here is badly configured though.

SeerLite added a commit to SeerLite/typings that referenced this pull request Dec 19, 2020
Fix the wrong format of the file caused by briano1905#68. This merge is
my best attempt at keeping the commit history.
@SeerLite
Copy link

Hey @andybui01 I made #92. It's based on this PR by you. I fixed the formatting with unix2dos and added some fixes myself. I also changed the functionality quite a bit so it isn't exactly the same. I hope that's fine!

@andybui01
Copy link
Author

Hey @andybui01 I made #92. It's based on this PR by you. I fixed the formatting with unix2dos and added some fixes myself. I also changed the functionality quite a bit so it isn't exactly the same. I hope that's fine!

Hey, it's fine. I've forgotten about this PR as I had to focus on uni so you're welcome to take over.

@andybui01 andybui01 closed this Nov 30, 2022
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.

4 participants