pangu.js icon indicating copy to clipboard operation
pangu.js copied to clipboard

do not remove space after '/'

Open ppwwyyxx opened this issue 3 years ago • 1 comments

This PR adds a few more test cases - all of them fail before this PR. https://github.com/vinta/pangu.js/issues/194 also talks about these failed cases.

However, after this PR, the existing test case

assert.equal(pangu.spacing('/home/和/root是Linux中的頂級目錄'), '/home/ 和 /root 是 Linux 中的頂級目錄');

will fail.

I think there is no way to make both work, and I think the new test cases are more important & common than the old special test case mentioning linux file system structure like "/home".

Also, when mentioning "/home", writers should better quote them - I modified the test case to add quotes.

Fix #194

ppwwyyxx avatar May 18 '22 00:05 ppwwyyxx

@vinta Would you take a look?

ppwwyyxx avatar Jul 20 '24 00:07 ppwwyyxx

Handling / with CJK is pretry tricky indeed. To be honest, these rules are simply my personal preference actullay, I cannot say yours are wrong.

Though I still prefer keeping the current rules.

vinta avatar Jun 24 '25 17:06 vinta

@vinta Thanks for your attention. I agree that the rules are personal preferences. On the other hand, do you think the inconsistent behaviors I gave in #194 need to be addressed & how?

ppwwyyxx avatar Jun 24 '25 19:06 ppwwyyxx

@ppwwyyxx Yes, will do!

vinta avatar Jun 25 '25 14:06 vinta