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

Fix author list comma behavior #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jchen-cs
Copy link

@jchen-cs jchen-cs commented Apr 5, 2023

I noticed that the authors list in the publications element did not add commas as expected in some cases.

I believe the issue came from referencing the incorrect variable when iterating through the author list:

{{- if le $author_index (len .) -}},{{- end -}}

Since . in this scope refers to author elements, which have a name and optionally me values, it can only have a length of either 1 or 2. Instead, . should be replaced with a reference to the entire list of authors.

The pull request fixes the issue by creating a new variable $authorlist, which may have been what the conditional intended to reference.

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.

1 participant