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

Behaviour when the replacing single-"word" match is not good #2

Open
studiosi opened this issue Nov 20, 2018 · 1 comment
Open

Behaviour when the replacing single-"word" match is not good #2

studiosi opened this issue Nov 20, 2018 · 1 comment

Comments

@studiosi
Copy link

studiosi commented Nov 20, 2018

If you do the following

replace.all("a", "a", "bB")

The result is

"b b"

Which does not follow any apparent logic. I immediately felt this behaviour as buggy to say the least.

@jedwards1211
Copy link
Owner

Sorry for the long delay, GitHub unfortunately didn't automatically make me watch this repo when I created it.

Thanks for bringing this up. The problem is it's inferring the type of the input "a" as space-separated, and converting bB from camel-case to space-separated. Probably I can make it use the case of the replacement bB when the input is ambiguous or one "word".

@jedwards1211 jedwards1211 changed the title Behaviour when the replacing string is longer than the query string is not good Behaviour when the replacing single-word match (which has ambiguous case) is not good May 14, 2019
@jedwards1211 jedwards1211 changed the title Behaviour when the replacing single-word match (which has ambiguous case) is not good Behaviour when the replacing single-"word" match is not good May 14, 2019
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

No branches or pull requests

2 participants