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

Missing space between authors and chapter #95

Closed
westcomputerconsultancy opened this issue Nov 10, 2020 · 2 comments
Closed

Missing space between authors and chapter #95

westcomputerconsultancy opened this issue Nov 10, 2020 · 2 comments

Comments

@westcomputerconsultancy
Copy link
Contributor

westcomputerconsultancy commented Nov 10, 2020

In a citation of a chapter the space is missing between the authors and the chapter

so, for example, instead of
Bloom, Harold. “Twelfth Night.” Shakespeare: The Invention of the Human. London: Forth Estate, 1998. 226–246. Print.

I am getting

Bloom, Harold.“Twelfth Night.” Shakespeare: The Invention of the Human. London: Forth Estate, 1998. 226–246. Print.

I think I might have tracked the problem down to

src/Styles/AffixesTrait.php

lines 86-89

            if ($closeQuote === $lastChar) { // last char is closing quote?
                $text = mb_substr($text, 0, mb_strlen($text) - 1); //set suffix before
                return $text . $suffix . $lastChar;
            }

I think should be

            if ($closeQuote === $lastChar) { // last char is closing quote?
                $text = mb_substr($text, 0, mb_strlen($text) - 1); //set suffix before
                return $prefix . $text . $suffix . $lastChar;
            }

but I'm not confident enough that I understand how the code works to be certain.

Used CSL stylesheet:

modern-language-association-7th-edition.csl

Used CSL metadata

Please replace these lines with your used metadata, for instance:
[
{
"number-of-volumes": "",
"issued": {
"date-parts": [
[
"1998",
"07",
"02"
]
]
},
"publisher": "Forth Estate",
"publisher-place": "London",
"type": "chapter",
"container-title": "Shakespeare: The Invention of the Human",
"author": [
{
"given": "Harold",
"family": "Bloom"
}
],
"page": "226-246",
"title": "Twelfth Night"
}
]

@seboettg
Copy link
Owner

Hi @westcomputerconsultancy!
Bugfix for this in v.2.2.4
Please update citeproc-php and close this issue if the bug is solved. Thank you.

@westcomputerconsultancy
Copy link
Contributor Author

Fixed. Many thanks.

seboettg added a commit that referenced this issue Dec 6, 2020
* commit 'a6ca1824643048dd60e20bb47fef850786f3f904':
  test case for bugfix in PR #96, sovles issue #95
  Update AffixesTrait.php
  Update CHANGELOG.md

# Conflicts:
#	tests/src/BugfixTest.php
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

2 participants