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

Remove extra sprace #6742

Merged
merged 1 commit into from
Oct 16, 2023
Merged

Remove extra sprace #6742

merged 1 commit into from
Oct 16, 2023

Conversation

koppor
Copy link
Contributor

@koppor koppor commented Oct 15, 2023

Follow-up to #6649. @POBrien333 merged to groups in "chapter". I think, by accident, the space in following change was not removed:

-         <group delimiter=", " suffix=", ">
+         <group delimiter=", " suffix=". ">

This PR fixes it.

@github-actions
Copy link

Awesome! You just created a pull request to the Citation Styles Language styles repository. One of our human volunteers will try to get in touch soon (usually within a week). In the meantime, I will run some automated checks. You should be notified of the results in a few minutes.

If you haven't done so yet, please make sure your style validates and follows all our other Style Requirements.

To update this pull request, visit the "Files changed" tab above, click on the ellipsis button in the top-right corner of your style, and then select "Edit file" to start editing:

If you have any questions, please leave a comment and we'll get back to you. While we usually respond in English, feel free to write in whatever language you're most comfortable.

@github-actions
Copy link

😃 Your submission passed all our automated tests.

Below are some sample citations generated based on your proposed changes:

ieee.csl (modified style)
[1], [2]
[3], [4]

[1]B. Hancké, M. Rhodes, and M. Thatcher, Eds., Beyond varieties of capitalism: Conflict, contradiction, and complementarities in the European economy. Oxford and New York: Oxford University Press, 2007.
[2]“CSL search by example,” Citation Style Editor. Accessed: Dec. 15, 2012. [Online]. Available: http://editor.citationstyles.org/searchByExample/
[3]I. Mares, “Firms and the welfare state: When, why, and how does social policy matter to employers?,” in Varieties of capitalism. The institutional foundations of comparative advantage, P. A. Hall and D. Soskice, Eds., New York: Oxford University Press, 2001, pp. 184–213.
[4]M. Fenner et al., “A data citation roadmap for scholarly data repositories,” Sci. Data, vol. 6, no. 1, p. 28, Apr. 2019, doi: 10.1038/s41597-019-0031-8.
 [1], [2]<br/>
 [3], [4]<br/>
 <hr/>
 [1]B. Hancké, M. Rhodes, and M. Thatcher, Eds., <i>Beyond varieties of capitalism: Conflict, contradiction, and complementarities in the European economy</i>. Oxford and New York: Oxford University Press, 2007.<br/>
 [2]“CSL search by example,” Citation Style Editor. Accessed: Dec. 15, 2012. [Online]. Available: http://editor.citationstyles.org/searchByExample/<br/>
-[3]I. Mares, “Firms and the welfare state: When, why, and how does social policy matter to employers?,” in <i>Varieties of capitalism. The institutional foundations of comparative advantage</i>, P. A. Hall and D. Soskice, Eds., New York: Oxford University Press, 2001, pp. 184–213. <br/>
+[3]I. Mares, “Firms and the welfare state: When, why, and how does social policy matter to employers?,” in <i>Varieties of capitalism. The institutional foundations of comparative advantage</i>, P. A. Hall and D. Soskice, Eds., New York: Oxford University Press, 2001, pp. 184–213.<br/>
 [4]M. Fenner <i>et al.</i>, “A data citation roadmap for scholarly data repositories,” <i>Sci. Data</i>, vol. 6, no. 1, p. 28, Apr. 2019, doi: 10.1038/s41597-019-0031-8.<br/>

@koppor
Copy link
Contributor Author

koppor commented Oct 15, 2023

I am not 100% sure if the update fixes the issue. Update Investigating the above diff, I tend to be pretty sure

Here the effect of an update of the csl styles in JabRef. That lead me to check the updates in ieee.csl.

image

@adam3smith
Copy link
Member

FWIW, citation processors should strip ending and duplicate spaces -- I'm surprised that that's not happening in JabRef (are they using citeproc-java or citeproc BibLaTeX under the hood?) -- but always better to keep things tidy & happy to accept this. citeproc-ruby as used for the preview does also notice the extra space.

@github-actions github-actions bot added the waiting-for-response-from-contributor The ticket/pull request is awaiting input from the contributor/depositor label Oct 16, 2023
@adam3smith adam3smith merged commit 9835688 into citation-style-language:master Oct 16, 2023
1 check passed
@koppor koppor deleted the patch-1 branch October 23, 2023 21:38
@koppor
Copy link
Contributor Author

koppor commented Oct 23, 2023

are they using citeproc-java or citeproc BibLaTeX under the hood?

JabRef is using citeproc-java 3.0.0-beta.2. - Others are also reporting issues with spaces (e.g., citeproc-java:3.0.0-beta.2).

The failing test was https://github.com/JabRef/jabref/blob/260ea31cfc1986502e18227bcae57ef2624dd3fe/src/test/java/org/jabref/logic/citationstyle/CitationStyleGeneratorTest.java#L146C10-L146C10.

The issue was that before the final newline, there was a space:

-       String expectedCitation = "[1]B. Smith, “An article,” J. Jones, Ed., Somewhere: Great Publisher, 2021, pp. 1–10. \n";
+       String expectedCitation = "[1]B. Smith, “An article,” J. Jones, Ed., Somewhere: Great Publisher, 2021, pp. 1–10.\n";

Thus, a simple space strip would not help. In case of multiple references, one would need to replace {space}\n.

Thus, this is the more elegant solution. Thank you for merging!

@github-actions github-actions bot removed the waiting-for-response-from-contributor The ticket/pull request is awaiting input from the contributor/depositor label Oct 23, 2023
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

Successfully merging this pull request may close these issues.

2 participants