words / ap-style-title-case

Convert a value to AP/APA title case
MIT License
41 stars 7 forks source link

Capitalization of X-Ray #2

Closed retorquere closed 5 years ago

retorquere commented 5 years ago

ap-title-case title-cases X-Ray as X-ray; https://titlecaseconverter.com/ capitalizes to X-Ray in AP mode.

zeke commented 5 years ago

Based on your message above, it looks like this module and that website are both producing the same value. Am I missing something?

retorquere commented 5 years ago

Sorry, mistyped that, updated original message

zeke commented 5 years ago

Are you sure? Here's the output I'm seeing from the latest module:

$ npx trymodule ap-style-title-case

> ap_style_title_case('X-Ray')
'X-Ray'
retorquere commented 5 years ago

Jeez I'm a doofus, sorry. What I had meant to say is that this:

const titleCase = require('ap-style-title-case')
console.log(titleCase("Observations of isolated pulsars and disk-fed X-ray binaries."))

outputs Observations of Isolated Pulsars and Disk-fed X-ray Binaries., where https://titlecaseconverter.com/ outputs Observations of Isolated Pulsars and Disk-Fed X-Ray Binaries.

zeke commented 5 years ago

I seeee! Thanks for enduring. I'd be open to changing the behavior for hyphenated words. Would you like to take a shot at submitting a pull request for this?

retorquere commented 5 years ago

Done in #3

zeke commented 5 years ago

Landed in 1.1.0 🎉

https://github.com/zeke/ap-style-title-case/pull/3#issuecomment-452783388