You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are some test cases for the issues. First test case is what you have in the README. Second and third test cases are the issues.
varcapitalize=require('capitalize')vartest=require('tape')test('Quotes test case 1',function(t){t.plan(1)t.equal(capitalize.words("it's a nice day"),"It's A Nice Day")})// This becomes: It’S A Boytest('Quotes test case 2',function(t){t.plan(1)t.equal(capitalize.words("It’s a Boy"),"It’s a Boy")})// This becomes: 'there's Angels Among Us'test('Quotes test case 3',function(t){t.plan(1)t.equal(capitalize.words("'There's angels among us'"),"'There's Angels Among Us'")})
The text was updated successfully, but these errors were encountered:
Thanks for reporting this issue. I'm not likely to get to it right now, and I can see that it will probably complicate the code quite a bit to solve, so I'm not sure I will do it at all. I would definitely accept a PR that makes those test cases pass. As a general approach I think one would need to first extract "balanced pairs" of quotes then recursively capitalize their contents.
Here are some test cases for the issues. First test case is what you have in the README. Second and third test cases are the issues.
The text was updated successfully, but these errors were encountered: