unwriter / Bitcom

Bitcoin Computer
54 stars 16 forks source link

lowercaseing strings with `bit echo` #4

Closed breign closed 5 years ago

breign commented 5 years ago

Hi command: bit echo "Hi, this is a protocol for pageshot app. PageShot automatically generates images from provided URL" to README produced

"data": [ "$", "echo", "hi, this is a protocol for pageshot app. pageshot automatically generates images from provided url", "to", "readme"],

all strings were lowecased unexpectedly :)

mathiasrw commented 5 years ago

Hah - just found out the same...

image

It originates from https://github.com/unwriter/Bitcom/blob/master/index.js#L12

I have a feeling the intended use is to make sure ECHO turns to echo and TO turns to ´to´ so that its consistent when searching.

@unwriter Can you confirm this is the case? If so ill look into a patch to make sure casing for strings are left out.

unwriter commented 5 years ago

Oh i actually just fixed this with the latest release and then came here to see this. This commit should have fixed it: it only lowercases the reserved keywords https://github.com/unwriter/Bitcom/commit/474b85b69e87e9eeabc01f9ee33e021326455d91

Let me know if it still needs tweaking