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

Add '/' to the list of splitter characters #12

Closed
wants to merge 1 commit into from

Conversation

doug2k1
Copy link

@doug2k1 doug2k1 commented Jul 16, 2024

Capitalize the word right after a / character.

Input: before/after and/or end
Expected output: Before/After and/or End
Current output: Before/after And/or End

@wooorm
Copy link
Member

wooorm commented Jul 16, 2024

@wooorm
Copy link
Member

wooorm commented Jul 16, 2024

This pkg is about AP style. Do you have a reference that says AP style includes slashes?

@doug2k1
Copy link
Author

doug2k1 commented Jul 16, 2024

@wooorm

Slashes are also used inside words

Good point. This PR requires more work.

This pkg is about AP style. Do you have a reference that says AP style includes slashes?

No, but other tools (such as this and this) that implement AP style capitalize the word after the slash.

Feel free to close the PR. I'll open another one if I'm able to implement a better solution.

@wooorm
Copy link
Member

wooorm commented Jul 17, 2024

I don’t see https://en.wikipedia.org/wiki/AP_Stylebook or https://en.wikipedia.org/wiki/APA_style, which are both linked from the readme, mention slash or /. I’d say we should find confirmed AP headlines and look for slashes in them to figure out what they do.

Looking at the current algo, it’s not too smart (" and such also forgotten?).
One option is to make it configurable? Then you can choose to pass a regex if you want to?

@doug2k1
Copy link
Author

doug2k1 commented Aug 16, 2024

Closing, as the proposed solution has shortcomings and I won't have time to improve it now.

@doug2k1 doug2k1 closed this Aug 16, 2024
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

Successfully merging this pull request may close these issues.

2 participants