Closed AS-adci closed 4 years ago
Ok. I've found place which make tests failed.
\Seboettg\CiteProc\Rendering\Group::render lines 114-123
if ($delimiter && ($elementCount < count($this->children))) { //check to see if the delimiter is already the last character of the text string //if so, remove it so we don't have two of them when the group will be merged $stext = strip_tags(trim($text)); if ((strrpos($stext, $delimiter[0]) + 1) == strlen($stext) && strlen($stext) > 1) { $text = str_replace($stext, '----REPLACE----', $text); $stext = substr($stext, 0, -1); $text = str_replace('----REPLACE----', $stext, $text); } }
In test we have next string:
<a href="https://example.org/author/doe" title="Doe, J.">Doe, J.</a>, & Müller, A.
In the first action(after condition) we strip tags. Then try to replace string and it doesn't work because original string has tags. So it doesn't trim delimiter in the end in the result.
Hi @AS-adci ! please check if this issue is solved with the latest commit https://github.com/seboettg/citeproc-php/commit/6258cd9c49264a5bc1b357211a5c670b7da9d937 Thank you in advance!
Version 2.2.0 has been released. Please update citeproc-php and check if the issue is solved. If yes, please close this ticket.
Please follow the general troubleshooting steps first:
Bug reports:
Unit test has 3 fails.
Used CSL stylesheet:
apa
Used CSL metadata
Test results
Comment
I don't sure about 1 and 2. But it looks like something wrong with delimiter processing. 3 looks like it needed to update test case.
It would be great if it will be fixed. Thank you.