-
Notifications
You must be signed in to change notification settings - Fork 139
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
Conversation
There was a problem hiding this 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 👍
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; | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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 |
Can you explain what this does? How it works? What happens when you switch to "custom mode". |
Conflicts can be resolved with |
Fix the wrong format of the file caused by briano1905#68. This merge is my best attempt at keeping the commit history.
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. |
Usage:
enter
custom
in input box and usemod + m
to switch to custom mode.