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

CSL-M: Title case conversion bug with cs:layout extension #211

Open
zepinglee opened this issue Jul 10, 2022 · 0 comments
Open

CSL-M: Title case conversion bug with cs:layout extension #211

zepinglee opened this issue Jul 10, 2022 · 0 comments

Comments

@zepinglee
Copy link
Contributor

The variable is not correctly converted to title case if it's rendered in the layout with locale attribute (CSL-M extension). In the following test case, the cite item has "language": "en-US" and it is rendered with <layout locale="en">. Then the text-case="title" should be applied to the title "Review of book by A.N. author". In the output, the last word "author" is capitalized as expected but the word "book" remains lowercase.

      + expected - actual

      -Review of book by A.N. Author
      +Review of Book by A.N. Author
>>===== MODE =====>>
citation
<<===== MODE =====<<



>>===== RESULT =====>>
Review of Book by A.N. Author
<<===== RESULT =====<<


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


>>===== INPUT =====>>
[
    {
        "id": "ITEM-1",
        "language": "en-US",
        "title": "Review of book by A.N. author",
        "type": "book"
    }
]
<<===== INPUT =====<<


>>===== VERSION =====>>
1.0
<<===== VERSION =====<<
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

No branches or pull requests

1 participant