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

plusplus to special characters as well? #75

Open
namratachaudhary opened this issue Jul 13, 2017 · 2 comments
Open

plusplus to special characters as well? #75

namratachaudhary opened this issue Jul 13, 2017 · 2 comments

Comments

@namratachaudhary
Copy link

namratachaudhary commented Jul 13, 2017

regex for thing being upvoted/downvoted is broken. -- works for special chars & empty strings as well.

image

image

Running ver 1.4.0

@namratachaudhary
Copy link
Author

namratachaudhary commented Jul 13, 2017

([\s\w'@.\-:\u3040-\u30FF\uFF01-\uFF60\u4E00-\u9FA0]*)

The .\- part in above regex means, a dot and hyphen are valid.

This regex could probably be accounting for names with hyphens in them. and hence the discrepancy.

The empty string issue could be, since the last character that got upvoted or downvoted is being cached.

    # check whether a name was specified. use MRU if not
    unless name? && name != ''
      [name, lastReason] = scoreKeeper.last(room)
      reason = lastReason if !reason? && lastReason?

@therealklanni
Copy link
Collaborator

If by "empty string" you mean the ability to say ++ to up/downvote the last thing up/downvoted, that's actually a feature, not a bug.

The RegExp for special characters could use some improvement, however. I'm open to PRs :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants