zotero / citeproc-rs

CSL processor in Rust.
https://cormacrelf.github.io/citeproc-wasm-demo/
Other
73 stars 11 forks source link

Bug report: capitalized first word in mixed case #148

Open zepinglee opened 2 years ago

zepinglee commented 2 years ago

The spec says that text-case="capitalize-first" only capitalizes the first character of the first word if the word is lowercase. Thus the word in mixed case (e.g., "iPad") should not be capitalized.

2ab195a output:

<IPhone and iPad
>iPhone and iPad
>>== MODE ==>>
citation
<<== MODE ==<<

>>== RESULT ==>>
iPhone and iPad
<<== RESULT ==<<

>>===== CSL =====>>
<style
      xmlns="http://purl.org/net/xbiblio/csl"
      class="note"
      version="1.0">
  <info>
    <id />
    <title />
    <updated>2009-08-10T04:49:00+09:00</updated>
  </info>
  <citation>
    <layout>
      <text variable="title" text-case="capitalize-first"/>
    </layout>
  </citation>
</style>
<<===== CSL =====<<

>>===== INPUT =====>>
[
    {
        "id": "item-1",
        "title": "iPhone and iPad",
        "type": "book"
    }
]
<<===== INPUT =====<<
jblachly commented 1 year ago

Duplicate of #145