We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88a72b0 commit 8f09d0aCopy full SHA for 8f09d0a
1 file changed
src/cffconvert/lib/cff_1_x_x/authors/apalike.py
@@ -154,7 +154,14 @@ def _from_name(self):
154
155
def _get_initials(self):
156
given_names = self._author.get("given-names").split(" ")
157
- return " ".join([given_name[0] + "." for given_name in given_names])
+ initials = []
158
+ for given_name in given_names:
159
+ if "-" in given_name:
160
+ name_parts = given_name.split("-")
161
+ initials.append("-".join([name_part[0] + "." for name_part in name_parts]))
162
+ else:
163
+ initials.append(given_name[0] + ".")
164
+ return " ".join(initials)
165
166
def as_string(self):
167
key = self._get_key()
0 commit comments